[patch] gl: destroy glyphs surface in _device_finish instead of _device_destroy
"Henry (Yu) Song - SISA" <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <3955FA337689574EB32F94B12A7E6E9E1635CD80@sisaex01sj> |
commit b38b7662942298617e199b60be8c4068169a89ec Author: Henry Song <[email protected]> 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); -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo