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.
This commit is contained in:
Henry Song 2012-07-11 10:05:51 +01:00 committed by Chris Wilson
parent 64a236246b
commit bdb9c2cb43

View file

@ -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);