summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRavi Nanjundappa <ravi.nanjundappa@gmail.com>2012-02-06 10:56:55 +0530
committerMartin Robinson <mrobinson@igalia.com>2013-02-07 13:25:33 -0800
commit562cc8227feb99b75fb53df7800df66887be129d (patch)
treef402d4073b474614f253325962fecee1ace92d8c
parent4b6b28b5e8b9020c72a60b01ff3340a70dd59478 (diff)
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@chris-wilson.co.uk>
-rw-r--r--src/cairo-gl-spans-compositor.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cairo-gl-spans-compositor.c b/src/cairo-gl-spans-compositor.c
index c5d97aa7..4317ccd0 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;