summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2011-04-06 15:24:33 +0100
committerNeil Roberts <neil@linux.intel.com>2011-04-06 17:38:18 +0100
commit961f330dcf3fbdf70744ae1b399966d604f7a243 (patch)
tree5c69332f825decb0583a9b2269fd2bfab7fe7c41
parent1e59487defdc2979c45fe6d199fb8b58111837ba (diff)
downloadclutter-961f330dcf3fbdf70744ae1b399966d604f7a243.tar.gz
cogl-pango-glyph-cache: Fix the flags passed to cogl_atlas_new
In 047227fb cogl_atlas_new was changed so that it can take a flags parameter to specify whether to clear the new atlases and whether to copy images to the new atlas after reorganisation. This was done so that the atlas code could be shared with the glyph cache. At some point during the development of this patch the flag was just a single boolean instead and this is accidentally how it is used from the glyph cache. The glyph cache therefore passes 'TRUE' as the set of flags which means it will only get the 'clear' flag and not the 'disable-migration' flag. When the glyph cache gets full it will therefore try to copy the texture to the new atlas as well as redrawing them with cairo. This causes problems because the glyph cache needs to work in situations where there is no FBO support. (cherry picked from commit b36dde61939b270796ec6fd0df824cf1cd3ad514)
-rw-r--r--clutter/cogl/pango/cogl-pango-glyph-cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/clutter/cogl/pango/cogl-pango-glyph-cache.c b/clutter/cogl/pango/cogl-pango-glyph-cache.c
index d90c384aa..288737ce3 100644
--- a/clutter/cogl/pango/cogl-pango-glyph-cache.c
+++ b/clutter/cogl/pango/cogl-pango-glyph-cache.c
@@ -226,7 +226,8 @@ cogl_pango_glyph_cache_lookup (CoglPangoGlyphCache *cache,
if (atlas == NULL)
{
atlas = _cogl_atlas_new (COGL_PIXEL_FORMAT_A_8,
- TRUE,
+ COGL_ATLAS_CLEAR_TEXTURE |
+ COGL_ATLAS_DISABLE_MIGRATION,
cogl_pango_glyph_cache_update_position_cb);
COGL_NOTE (ATLAS, "Created new atlas for glyphs: %p", atlas);
/* If we still can't reserve space then something has gone