OGL text renderer needs to provide an information about the destination content to lcd shader in order to compose lcd glyph correctly. At the moment, the destination content is read from frame buffer with j2d_glCopyTexSubImage2D(), what could be quite slow. and it dramatically affects the overall performance of text rendering in the case of lcd glyphs. This effect is quite noticeable on MacOS X, where OpenGL pipeline is used by default. On other platforms the OpenGL pipeline is optional, but the problem also exists, and becomes visible if the pipeline is activated. Proposed solution: we can avoid the reading from the destination frame buffer at least in cases where a destination surface data is based on a texture of an appropriate type.
|