Bumping manifests a=b2g-bump
[gecko.git] / gfx / cairo / premultiply-alpha-solid-gradients.patch
blob665f64969ad10c21abd8f5bf71d8b650d0076092
1 Fix single and multi-stop solid gradients by multiplying by the alpha component. r=roc
3 This cairo commit that caused the problem: 2d790daa957471670f4ae0d3b22da89e4ee7111f.
4 It was merged into mozilla-central with 1effb72d30cf
6 diff --git a/gfx/cairo/cairo/src/cairo-pattern.c b/gfx/cairo/cairo/src/cairo-pattern.c
7 --- a/gfx/cairo/cairo/src/cairo-pattern.c
8 +++ b/gfx/cairo/cairo/src/cairo-pattern.c
9 @@ -2262,8 +2262,17 @@ _cairo_pattern_acquire_surface (const ca
11 if (src->n_stops)
13 + cairo_color_t color;
15 + /* multiply by alpha */
16 + _cairo_color_init_rgba (&color,
17 + src->stops->color.red,
18 + src->stops->color.green,
19 + src->stops->color.blue,
20 + src->stops->color.alpha);
22 _cairo_pattern_init_solid (&solid,
23 - &src->stops->color,
24 + &color,
25 CAIRO_CONTENT_COLOR_ALPHA);
27 else
28 @@ -2295,9 +2304,17 @@ _cairo_pattern_acquire_surface (const ca
30 if (i == src->n_stops) {
31 cairo_solid_pattern_t solid;
32 + cairo_color_t color;
34 + /* multiply by alpha */
35 + _cairo_color_init_rgba (&color,
36 + src->stops->color.red,
37 + src->stops->color.green,
38 + src->stops->color.blue,
39 + src->stops->color.alpha);
41 _cairo_pattern_init_solid (&solid,
42 - &src->stops->color,
43 + &color,
44 CAIRO_CONTENT_COLOR_ALPHA);
46 status =