[cairo-commit] src/cairo-gl-device.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Jul 11 02:19:58 PDT 2012


 src/cairo-gl-device.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit bdb9c2cb4389d7bcbd3602f8ce8fb457fb1003bd
Author: Henry Song <henry.song at samsung.com>
Date:   Wed Jul 11 10:05:51 2012 +0100

    gl: Destroy glyph cache surface during finish
    
    We must destroy glyph cache surface in device_finish instead of in
    device_destroy because in device_destroy device status is
    DEVICE_FINISHED and the operation is invalid.

diff --git a/src/cairo-gl-device.c b/src/cairo-gl-device.c
index 87ceb66..ae4669a 100644
--- a/src/cairo-gl-device.c
+++ b/src/cairo-gl-device.c
@@ -108,6 +108,9 @@ _gl_finish (void *device)
 
     _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 +134,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);
 
     cairo_region_destroy (ctx->clip_region);


More information about the cairo-commit mailing list