[cairo-commit] src/cairo-gl-gradient.c
Chris Wilson
ickle at kemper.freedesktop.org
Sat Dec 1 09:10:43 PST 2012
src/cairo-gl-gradient.c | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 9f43f096b22a13f02d638b86b4460c7ed66d3c96
Author: Henry Song <henry.song at samsung.com>
Date: Sat Dec 1 17:08:56 2012 +0000
gl: Flush context upon evicting a gradient
As the random selection of a gradient can possible destroy the currently
active gradient, we need to flush the context in order to flush any
references to the texture before deletion.
diff --git a/src/cairo-gl-gradient.c b/src/cairo-gl-gradient.c
index 1c1f972..ac32921 100644
--- a/src/cairo-gl-gradient.c
+++ b/src/cairo-gl-gradient.c
@@ -328,6 +328,8 @@ _cairo_gl_gradient_destroy (cairo_gl_gradient_t *gradient)
return;
if (_cairo_gl_context_acquire (gradient->device, &ctx) == CAIRO_STATUS_SUCCESS) {
+ /* The gradient my still be active in the last operation, so flush */
+ _cairo_gl_composite_flush (ctx);
glDeleteTextures (1, &gradient->tex);
ignore = _cairo_gl_context_release (ctx, CAIRO_STATUS_SUCCESS);
}
More information about the cairo-commit
mailing list