[patch] gl: flush drawing before gradient is destroyed

"Henry (Yu) Song - SISA" <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <3955FA337689574EB32F94B12A7E6E9E2483A30D@sisaex01sj>
From 2bca0ff7652925ae47ac76a4c1a1d04739ae3a4c Mon Sep 17 00:00:00 2001
From: Henry Song <[email protected]>
Date: Mon, 26 Nov 2012 10:58:15 -0800
Subject: [PATCH] random remove gradient can possibly remove a gradient that
 has not been flushed.  Force previous drawing to flush when
 a gradient is destroyed

---
 src/cairo-gl-gradient.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/cairo-gl-gradient.c b/src/cairo-gl-gradient.c
index 1c1f972..3e4f499 100644
--- a/src/cairo-gl-gradient.c
+++ b/src/cairo-gl-gradient.c
@@ -328,6 +328,7 @@ _cairo_gl_gradient_destroy (cairo_gl_gradient_t *gradient)
     return;

     if (_cairo_gl_context_acquire (gradient->device, &ctx) == CAIRO_STATUS_SUCCESS) {
+        _cairo_gl_composite_flush (ctx);
         glDeleteTextures (1, &gradient->tex);
         ignore = _cairo_gl_context_release (ctx, CAIRO_STATUS_SUCCESS);
     }
--
1.7.10.4

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.