michael@0: From: Robert O'Callahan michael@0: Bug 579985. Using CGContextSetAlpha to implement mask alpha doesn't work for some operators. r=jrmuizel,a=blocking michael@0: michael@0: diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c michael@0: --- a/gfx/cairo/cairo/src/cairo-quartz-surface.c michael@0: +++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c michael@0: @@ -2734,17 +2734,19 @@ _cairo_quartz_surface_mask (void *abstra michael@0: michael@0: if (IS_EMPTY(surface)) michael@0: return CAIRO_STATUS_SUCCESS; michael@0: michael@0: rv = _cairo_surface_clipper_set_clip (&surface->clipper, clip); michael@0: if (unlikely (rv)) michael@0: return rv; michael@0: michael@0: - if (mask->type == CAIRO_PATTERN_TYPE_SOLID) { michael@0: + /* Using CGContextSetAlpha to implement mask alpha doesn't work for all operators. */ michael@0: + if (mask->type == CAIRO_PATTERN_TYPE_SOLID && michael@0: + op == CAIRO_OPERATOR_OVER) { michael@0: /* This is easy; we just need to paint with the alpha. */ michael@0: cairo_solid_pattern_t *solid_mask = (cairo_solid_pattern_t *) mask; michael@0: michael@0: CGContextSetAlpha (surface->cgContext, solid_mask->color.alpha); michael@0: rv = _cairo_quartz_surface_paint (surface, op, source, clip); michael@0: CGContextSetAlpha (surface->cgContext, 1.0); michael@0: michael@0: return rv; michael@0: diff --git a/layout/reftests/bugs/579985-1-ref.html b/layout/reftests/bugs/579985-1-ref.html michael@0: new file mode 100644 michael@0: --- /dev/null michael@0: +++ b/layout/reftests/bugs/579985-1-ref.html michael@0: @@ -0,0 +1,6 @@ michael@0: + michael@0: + michael@0: + michael@0: +
Hello
michael@0: + michael@0: + michael@0: diff --git a/layout/reftests/bugs/579985-1.html b/layout/reftests/bugs/579985-1.html michael@0: new file mode 100644 michael@0: --- /dev/null michael@0: +++ b/layout/reftests/bugs/579985-1.html michael@0: @@ -0,0 +1,16 @@ michael@0: + michael@0: + michael@0: + michael@0: + michael@0: + michael@0: + michael@0: +
Hello
michael@0: + michael@0: + michael@0: diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list michael@0: --- a/layout/reftests/bugs/reftest.list michael@0: +++ b/layout/reftests/bugs/reftest.list michael@0: @@ -1499,16 +1499,17 @@ random-if(layersGPUAccelerated) == 56499 michael@0: == 571347-3.html 571347-3-ref.html michael@0: == 572598-1.html 572598-ref.html michael@0: == 574898-1.html 574898-ref.html michael@0: == 579655-1.html 579655-1-ref.html michael@0: == 577838-1.html 577838-1-ref.html michael@0: == 577838-2.html 577838-2-ref.html michael@0: random-if(layersGPUAccelerated) == 579323-1.html 579323-1-ref.html michael@0: == 579349-1.html 579349-1-ref.html michael@0: +== 579985-1.html 579985-1-ref.html michael@0: == 580160-1.html 580160-1-ref.html michael@0: HTTP(..) == 580863-1.html 580863-1-ref.html michael@0: random-if(layersGPUAccelerated) == 581317-1.html 581317-1-ref.html michael@0: == 581579-1.html 581579-1-ref.html michael@0: == 582037-1a.html 582037-1-ref.html michael@0: == 582037-1b.html 582037-1-ref.html michael@0: == 582037-2a.html 582037-2-ref.html michael@0: == 582037-2b.html 582037-2-ref.html