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.
This commit is contained in:
Martin Robinson 2013-02-06 12:53:14 -08:00
parent 7bee1962f6
commit 400ea9c290

View file

@ -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);