mutter/pango
Neil Roberts 8123330061 cogl-pango: Use a CoglAtlas to maintain the glyph cache
The glyph cache is now stored in a CoglAtlas structure instead of the
custom atlasing code. This has the advantage that it can share code
with the main texture atlas and that it supports reorganizing the
atlas when it becomes full. Unlike the texture atlas, the glyph cache
can use multiple atlases which would be neccessary if the maximum
texture size is reached and we need to create a second
texture. Whenever a display list is created it now has to register a
callback with the glyph cache so that the display list can be
recreated whenever any of the atlases are reorganized. This is needed
because the display list directly stores texture coordinates within
the atlas texture and they would become invalid when the texture is
moved.

The ensure_glyphs_for_layout now works in two steps. First it reserves
space in the atlas for all of the glyphs. The atlas is created with
the DISABLE_MIGRATION flag so that it won't actually copy any textures
if any rearranging is needed. Whenever the position is updated for a
glyph then it is marked as dirty. After space for all of the glyphs
has been reserved it will iterate over all dirty glyphs and redraw
them using Cairo. The rendered glyph is then stored in the texture
with a sub texture update.

The glyphs need to all be set at the right location before starting to
create the display list because the display list stores the texture
coordinates of the glyph. If any of the glyphs were moved around then
the parts of the display list that was created already would become
invalid. To make this work, ensure_glyphs_for_layout is now always
called before rendering a layout or a layout line.
2010-08-12 11:56:59 +01:00
..
cogl-pango-display-list.c cogl: explicitly mark cogl_<object>_ref/unref APIs as deprecated 2010-02-12 14:05:01 +00:00
cogl-pango-display-list.h [cogl] move clutter/pango to clutter/cogl/pango 2009-10-16 18:58:51 +01:00
cogl-pango-fontmap.c [cogl] move clutter/pango to clutter/cogl/pango 2009-10-16 18:58:51 +01:00
cogl-pango-glyph-cache.c cogl-pango: Use a CoglAtlas to maintain the glyph cache 2010-08-12 11:56:59 +01:00
cogl-pango-glyph-cache.h cogl-pango: Use a CoglAtlas to maintain the glyph cache 2010-08-12 11:56:59 +01:00
cogl-pango-private.h [cogl] move clutter/pango to clutter/cogl/pango 2009-10-16 18:58:51 +01:00
cogl-pango-render.c cogl-pango: Use a CoglAtlas to maintain the glyph cache 2010-08-12 11:56:59 +01:00
cogl-pango.h [cogl] move clutter/pango to clutter/cogl/pango 2009-10-16 18:58:51 +01:00
Makefile.am [cogl] move clutter/pango to clutter/cogl/pango 2009-10-16 18:58:51 +01:00