summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2010-04-24 15:15:05 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2010-05-03 10:59:36 +0300
commit2d65fb033b57c701e2c16747470f86bda1d861e0 (patch)
tree3996ab32e2be30ae741f4e77aa9ff8b687eb297b
parent19459672ce68b6ad6a4d376cb2d7c9a6d889ae01 (diff)
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.
-rw-r--r--pixman/pixman-image.c6
-rw-r--r--test/blitters-test.c2
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");
}