[Pixman] [PATCH] pixman_image_composite: Reduce opaque masks to NULL

Søren Sandmann sandmann at cs.au.dk
Fri Nov 9 13:13:04 PST 2012


From: Søren Sandmann Pedersen <ssp at redhat.com>

When the mask is known to be opaque, we might as well reduce it to
NULL to take advantage of the various fast paths that operate on NULL
masks.
---
 pixman/pixman.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pixman/pixman.c b/pixman/pixman.c
index e3b6516..e0ccd87 100644
--- a/pixman/pixman.c
+++ b/pixman/pixman.c
@@ -587,7 +587,7 @@ pixman_image_composite32 (pixman_op_t      op,
     src_format = src->common.extended_format_code;
     src_flags = src->common.flags;
 
-    if (mask)
+    if (mask && !(mask->common.flags & FAST_PATH_IS_OPAQUE))
     {
 	mask_format = mask->common.extended_format_code;
 	mask_flags = mask->common.flags;
-- 
1.7.4



More information about the Pixman mailing list