From 2d65fb033b57c701e2c16747470f86bda1d861e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Sat, 24 Apr 2010 15:15:05 -0400 Subject: [PATCH] Don't consider indexed formats opaque. The indexed formats have 0 bits of alpha, but can't be considered opaque because there may be non-opaque colors in the palette. --- pixman/pixman-image.c | 6 ++++-- test/blitters-test.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c index 9604bfe..6b0dc6d 100644 --- a/pixman/pixman-image.c +++ b/pixman/pixman-image.c @@ -394,8 +394,10 @@ compute_image_info (pixman_image_t *image) } } - if (image->common.repeat != PIXMAN_REPEAT_NONE && - !PIXMAN_FORMAT_A (image->bits.format)) + if (image->common.repeat != PIXMAN_REPEAT_NONE && + !PIXMAN_FORMAT_A (image->bits.format) && + PIXMAN_FORMAT_TYPE (image->bits.format) != PIXMAN_TYPE_GRAY && + PIXMAN_FORMAT_TYPE (image->bits.format) != PIXMAN_TYPE_COLOR) { flags |= FAST_PATH_IS_OPAQUE; } diff --git a/test/blitters-test.c b/test/blitters-test.c index 5e33031..18f871e 100644 --- a/test/blitters-test.c +++ b/test/blitters-test.c @@ -482,7 +482,7 @@ main (int argc, char *argv[]) /* Predefined value for running with all the fastpath functions disabled. It needs to be updated every time when changes are introduced to this program or behavior of pixman changes! */ - if (crc == 0xA058F792) + if (crc == 0x8F9F7DC1) { printf ("blitters test passed\n"); } -- 2.7.4