diff options
author | Martin Robinson <mrobinson@igalia.com> | 2013-02-06 12:53:14 -0800 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2013-02-06 12:53:14 -0800 |
commit | 400ea9c2905461067df9e6d27c2e961d47f04676 (patch) | |
tree | 7ddc16e026e0678c6acca77efaf14dcb71282898 | |
parent | 7bee1962f601009c507f987838de1a9dec3d9334 (diff) |
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.
-rw-r--r-- | src/cairo-gl-msaa-compositor.c | 7 |
1 files changed, 7 insertions, 0 deletions
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); |