From 400ea9c2905461067df9e6d27c2e961d47f04676 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Wed, 6 Feb 2013 12:53:14 -0800 Subject: gl/msaa: Properly fall back when using CLEAR operator There are some situations that the MSAA compositor doesn't support using the CLEAR operator. We should properly fall back in those cases. --- src/cairo-gl-msaa-compositor.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cairo-gl-msaa-compositor.c b/src/cairo-gl-msaa-compositor.c index a0fd9a0e..28001fea 100644 --- a/src/cairo-gl-msaa-compositor.c +++ b/src/cairo-gl-msaa-compositor.c @@ -409,6 +409,10 @@ _cairo_gl_msaa_compositor_mask (const cairo_compositor_t *compositor, if (! can_use_msaa_compositor (dst, CAIRO_ANTIALIAS_DEFAULT)) return CAIRO_INT_STATUS_UNSUPPORTED; + if (composite->op == CAIRO_OPERATOR_CLEAR && + composite->original_mask_pattern != NULL) + return CAIRO_INT_STATUS_UNSUPPORTED; + /* GL compositing operators cannot properly represent a mask operation using the SOURCE compositing operator in one pass. This only matters if there actually is a mask (there isn't in a paint operation) and if the @@ -851,6 +855,9 @@ _cairo_gl_msaa_compositor_glyphs (const cairo_compositor_t *compositor, if (! dst->supports_stencil) return CAIRO_INT_STATUS_UNSUPPORTED; + if (composite->op == CAIRO_OPERATOR_CLEAR) + return CAIRO_INT_STATUS_UNSUPPORTED; + if (composite->is_bounded == FALSE) { cairo_surface_t* surface = _prepare_unbounded_surface (dst); -- cgit v1.2.3