summaryrefslogtreecommitdiff
path: root/src/cairo-gl-msaa-compositor.c
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2013-01-09 14:16:59 -0800
committerMartin Robinson <mrobinson@igalia.com>2013-01-09 14:33:41 -0800
commit1bcd59ef4c9dceaefa51ec6db1f5240d75940724 (patch)
tree36adf72b8bab59a442d886bc7831493c3979d97c /src/cairo-gl-msaa-compositor.c
parentd524697ede85d36e4f88fa44d6a8b884685d804b (diff)
downloadcairo-1bcd59ef4c9dceaefa51ec6db1f5240d75940724.tar.gz
gl/msaa: Rely on the stencil buffer to cache the clip
When using a texture surface the depth/stencil buffer is private to cairo so we can rely on the fact that any previously painted clip is still valid. We also only scissor when there's a previously painted clip on the stencil buffer, otherwise we disable the scissor test. This fixes a few test cases.
Diffstat (limited to 'src/cairo-gl-msaa-compositor.c')
-rw-r--r--src/cairo-gl-msaa-compositor.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cairo-gl-msaa-compositor.c b/src/cairo-gl-msaa-compositor.c
index ca9fe22ff..577373379 100644
--- a/src/cairo-gl-msaa-compositor.c
+++ b/src/cairo-gl-msaa-compositor.c
@@ -583,6 +583,10 @@ _prevent_overlapping_strokes (cairo_gl_context_t *ctx,
be drawn there until the stencil buffer is reset or the stencil test
is disabled. */
glStencilOp (GL_ZERO, GL_ZERO, GL_ZERO);
+
+ _cairo_clip_destroy (setup->dst->clip_on_stencil_buffer);
+ setup->dst->clip_on_stencil_buffer = NULL;
+
return CAIRO_INT_STATUS_SUCCESS;
}