[cairo-commit] src/cairo-gl-spans-compositor.c
Martin Robinson
mrobinson at kemper.freedesktop.org
Thu Feb 7 13:25:51 PST 2013
src/cairo-gl-spans-compositor.c | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 562cc8227feb99b75fb53df7800df66887be129d
Author: Ravi Nanjundappa <ravi.nanjundappa at gmail.com>
Date: Mon Feb 6 10:56:55 2012 +0530
gl/spans: Handle SOURCE operations with opaque sources.
SOURCE operations with an opaque are equivalent to OVER.
This can prevent us from falling back in certain cases.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-gl-spans-compositor.c b/src/cairo-gl-spans-compositor.c
index c5d97aa..4317ccd 100644
--- a/src/cairo-gl-spans-compositor.c
+++ b/src/cairo-gl-spans-compositor.c
@@ -431,6 +431,13 @@ _cairo_gl_span_renderer_init (cairo_abstract_span_renderer_t *_r,
cairo_operator_t op = composite->op;
cairo_int_status_t status;
+ if (op == CAIRO_OPERATOR_SOURCE) {
+ if (! _cairo_pattern_is_opaque (&composite->source_pattern.base,
+ &composite->source_sample_area))
+ return CAIRO_INT_STATUS_UNSUPPORTED;
+ op = CAIRO_OPERATOR_OVER;
+ }
+
/* XXX earlier! */
if (op == CAIRO_OPERATOR_CLEAR) {
source = &_cairo_pattern_white.base;
More information about the cairo-commit
mailing list