Doesn't handle every pixel format, but for those that it does, enables early
conversion of OVER to SRC, for example.
---
 pixman/pixman-image.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c
index 1ff1a49..ad6e82e 100644
--- a/pixman/pixman-image.c
+++ b/pixman/pixman-image.c
@@ -438,6 +438,12 @@ compute_image_info (pixman_image_t *image)
            image->common.repeat != PIXMAN_REPEAT_NONE)
        {
            code = PIXMAN_solid;
+           if ((image->bits.format == PIXMAN_a8 && *(uint8_t 
*)image->bits.bits) == 0xFF   ||
+               ((image->bits.format == PIXMAN_b8g8r8a8 || image->bits.format 
== PIXMAN_r8g8b8a8) && (0xff &~ image->bits.bits[0]) == 0) ||
+               ((image->bits.format == PIXMAN_a8r8g8b8 || image->bits.format 
== PIXMAN_a8b8g8r8 || image->bits.format == PIXMAN_a8r8g8b8_sRGB) && 
(0xff000000 &~ image->bits.bits[0]) == 0))
+           {
+               flags |= FAST_PATH_SAMPLES_OPAQUE | FAST_PATH_IS_OPAQUE;
+           }
        }
        else
        {
-- 
1.7.5.4

_______________________________________________
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to