mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-03 03:30:17 +01:00
pattern: Fix _gradient_is_opaque() for zero stops
_gradient_is_opaque() previously returned TRUE for gradient with no stops, triggering a false optimization in _cairo_gstate_mask(). Fixes test/gradient-zero-stops-mask Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
01e1821942
commit
35f19bc084
1 changed files with 3 additions and 0 deletions
|
|
@ -1795,6 +1795,9 @@ _gradient_is_opaque (const cairo_gradient_pattern_t *gradient)
|
|||
{
|
||||
unsigned int i;
|
||||
|
||||
if (gradient->n_stops == 0)
|
||||
return FALSE;
|
||||
|
||||
for (i = 0; i < gradient->n_stops; i++)
|
||||
if (! CAIRO_COLOR_IS_OPAQUE (&gradient->stops[i].color))
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue