From 7d8359721b581845260c0442a174e48b061484a7 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 7 Jun 2010 16:46:46 +0200 Subject: gl: Fix span renderer doing bad stuff for CLEAR and SOURCE SOURCE will fallback now, CLEAR is identical to DEST_OUT with white. --- src/cairo-gl-surface.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c index 02278fbf..8a2379fe 100644 --- a/src/cairo-gl-surface.c +++ b/src/cairo-gl-surface.c @@ -1342,6 +1342,13 @@ _cairo_gl_surface_polygon (cairo_gl_surface_t *dst, if (! _cairo_surface_check_span_renderer (op, src, &dst->base, antialias)) return UNSUPPORTED ("no span renderer"); + if (op == CAIRO_OPERATOR_SOURCE) + return UNSUPPORTED ("SOURCE compositing doesn't work in GL"); + if (op == CAIRO_OPERATOR_CLEAR) { + op = CAIRO_OPERATOR_DEST_OUT; + src = &_cairo_pattern_white.base; + } + status = _cairo_surface_composite_polygon (&dst->base, op, src, -- cgit v1.2.3