mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 12:18:01 +02:00
xlib: ADD only reduces to SOURCE for alpha-only targets
Fixes operator. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
44a868b552
commit
e217677ce6
1 changed files with 6 additions and 2 deletions
|
|
@ -313,8 +313,12 @@ fill_reduces_to_source (cairo_operator_t op,
|
|||
const cairo_color_t *color,
|
||||
cairo_xlib_surface_t *dst)
|
||||
{
|
||||
if (dst->base.is_clear || CAIRO_COLOR_IS_OPAQUE (color))
|
||||
return op == CAIRO_OPERATOR_OVER || op == CAIRO_OPERATOR_ADD;
|
||||
if (dst->base.is_clear || CAIRO_COLOR_IS_OPAQUE (color)) {
|
||||
if (op == CAIRO_OPERATOR_OVER)
|
||||
return TRUE;
|
||||
if (op == CAIRO_OPERATOR_ADD)
|
||||
return (dst->base.content & CAIRO_CONTENT_COLOR) == 0;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue