[PATH 1/2] gl/msaa: Small improvements to clipping

"Henry (Yu) Song - SISA" <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <3955FA337689574EB32F94B12A7E6E9E0B418428@ex10mail>
This is a patch to improve clipping for cairo/gl msaa backend


From 82f9de286eb217d8c1218b4b61cb001129874857 Mon Sep 17 00:00:00 2001
From: "Henry (Yu) Song" <[email protected]>
Date: Thu, 3 Nov 2011 12:02:30 -0700
Subject: [PATCH 1/2] gl/msaa: Small improvements to clipping

When clipping support CAIRO_ANTIALIAS_DEFAULT as well,
since this is the sort of clip that's produced when even
when the context is using CAIRO_ANTIALIAS_NONE. Also
correctly reset the color mask when clipping fails.
---
src/cairo-gl-msaa-compositor.c |    4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/cairo-gl-msaa-compositor.c b/src/cairo-gl-msaa-compositor.c
index ac1468f..2c8e4f5 100644
--- a/src/cairo-gl-msaa-compositor.c
+++ b/src/cairo-gl-msaa-compositor.c
@@ -166,7 +166,8 @@ _draw_clip (cairo_gl_context_t          *ctx,
     if (unlikely (status))
     return status;
-    if (antialias != CAIRO_ANTIALIAS_NONE) {
+    if (antialias != CAIRO_ANTIALIAS_NONE &&
+     antialias != CAIRO_ANTIALIAS_DEFAULT) {
     _cairo_polygon_fini (&polygon);
     return CAIRO_INT_STATUS_UNSUPPORTED;
     }
@@ -215,6 +216,7 @@ _draw_clip_to_stencil_buffer (cairo_gl_context_t    *ctx,
     status = _draw_clip (ctx, setup, clip);
     if (unlikely (status)) {
     _disable_stencil_buffer ();
+     glColorMask (1, 1, 1, 1);
     return status;
     }
--
1.7.5.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.