[cairo] [patch] gl: destroy glyphs surface in _device_finish instead of _device_destroy

Henry (Yu) Song - SISA hsong at sisa.samsung.com
Tue Jul 10 18:42:00 PDT 2012


commit b38b7662942298617e199b60be8c4068169a89ec
Author: Henry Song <henry.song at samsung.com>
Date:   Tue Jul 10 18:40:14 2012 -0700

    gl:  we must destroy glyph cache surface in device_finish instead of in
    device_destroy because in device_destroy, device status is DEVICE_FINISHED

diff --git a/src/cairo-gl-device.c b/src/cairo-gl-device.c
index 87ceb66..ea419fe 100644
--- a/src/cairo-gl-device.c
+++ b/src/cairo-gl-device.c
@@ -107,6 +107,10 @@ _gl_finish (void *device)
     _cairo_cache_fini (&ctx->gradients);
 
     _cairo_gl_context_fini_shaders (ctx);
+    
+    for (n = 0; n < ARRAY_LENGTH (ctx->glyph_cache); n++)
+	_cairo_gl_glyph_cache_fini (ctx, &ctx->glyph_cache[n]);
+
 
     _gl_unlock (device);
 }
@@ -131,9 +135,6 @@ _gl_destroy (void *device)
 	free (font);
     }
 
-    for (n = 0; n < ARRAY_LENGTH (ctx->glyph_cache); n++)
-	_cairo_gl_glyph_cache_fini (ctx, &ctx->glyph_cache[n]);
-
     _cairo_array_fini (&ctx->tristrip_indices);
 


More information about the cairo mailing list