mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-16 06:10:31 +01:00
Fix optimization of white IN dest compositing
The optimization of any opaque color IN an alpha-only surface is a noop (it multiplies the alpha of each pixel of the destination by 1). The same does not apply to colored destinations, because IN replaces the original color with the color of the source. Fixes white-in-noop.
This commit is contained in:
parent
9e6d8ff86c
commit
01799bf052
1 changed files with 2 additions and 1 deletions
|
|
@ -1899,7 +1899,8 @@ _cairo_surface_fill_region (cairo_surface_t *surface,
|
|||
|
||||
/* catch a common reduction of _cairo_clip_combine_with_surface() */
|
||||
if (op == CAIRO_OPERATOR_IN &&
|
||||
_cairo_color_equal (color, CAIRO_COLOR_WHITE))
|
||||
surface->content == CAIRO_CONTENT_ALPHA &&
|
||||
CAIRO_COLOR_IS_OPAQUE (color))
|
||||
{
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue