[cairo-commit] 2 commits - src/cairo-surface.c test/Makefile.am
Andrea Canciani
ranma42 at kemper.freedesktop.org
Mon Jan 17 03:19:18 PST 2011
src/cairo-surface.c | 3 ++-
test/Makefile.am | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 01799bf0523d11e1bdb239caa265ce40cdcdfafa
Author: Andrea Canciani <ranma42 at gmail.com>
Date: Mon Jan 17 10:25:30 2011 +0100
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.
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 36eaa79..b9d9e16 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -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;
}
commit 9e6d8ff86c9a8584ba25c78b1c4f3d50dba03e08
Author: Andrea Canciani <ranma42 at gmail.com>
Date: Mon Jan 17 12:17:30 2011 +0100
test: Add missing ref image to REFERENCE_IMAGES
diff --git a/test/Makefile.am b/test/Makefile.am
index b33e4f9..8914f07 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1444,6 +1444,7 @@ REFERENCE_IMAGES = \
xlib-surface-source.ps3.ref.png \
xlib-surface-source.svg12.argb32.xfail.png \
xlib-surface-source.svg12.rgb24.xfail.png \
+ white-in-noop.ref.png \
zero-mask.ref.png \
zero-mask.rgb24.ref.png \
zero-alpha.ref.png
More information about the cairo-commit
mailing list