summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Venhoda <lvenhoda@redhat.com>2015-11-25 17:14:29 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2015-12-17 16:03:19 +0100
commitfc1f511bb8beb7e8efd1773a79eb4d09c93c90d5 (patch)
tree7f6a8af590d67a0bea711eee9a9a26b5242899f3
parent2ee5cb522ee16a756c74ed6e127cf3874a45f3a6 (diff)
downloadspice-common-fc1f511bb8beb7e8efd1773a79eb4d09c93c90d5.tar.gz
spice-common-fc1f511bb8beb7e8efd1773a79eb4d09c93c90d5.tar.xz
spice-common-fc1f511bb8beb7e8efd1773a79eb4d09c93c90d5.zip
pixman_utils: Use PIXMAN_LE_ constants in spice_bitmap_try_as_pixman()
After the previous commit, spice_bitmap_try_as_pixman() can be simplified as its #ifdef WORDS_BIGENDIAN exactly match what the PIXMAN_LE_ constants do.
-rw-r--r--common/pixman_utils.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/common/pixman_utils.c b/common/pixman_utils.c
index 27ab155..c2161ca 100644
--- a/common/pixman_utils.c
+++ b/common/pixman_utils.c
@@ -1003,25 +1003,13 @@ pixman_image_t *spice_bitmap_try_as_pixman(int src_format,
switch (src_format) {
case SPICE_BITMAP_FMT_32BIT:
-#ifdef WORDS_BIGENDIAN
- pixman_format = PIXMAN_b8g8r8x8;
-#else
- pixman_format = PIXMAN_x8r8g8b8;
-#endif
+ pixman_format = PIXMAN_LE_x8r8g8b8;
break;
case SPICE_BITMAP_FMT_RGBA:
-#ifdef WORDS_BIGENDIAN
- pixman_format = PIXMAN_b8g8r8a8;
-#else
- pixman_format = PIXMAN_a8r8g8b8;
-#endif
+ pixman_format = PIXMAN_LE_a8r8g8b8;
break;
case SPICE_BITMAP_FMT_24BIT:
-#ifdef WORDS_BIGENDIAN
- pixman_format = PIXMAN_b8g8r8;
-#else
- pixman_format = PIXMAN_r8g8b8;
-#endif
+ pixman_format = PIXMAN_LE_r8g8b8;
break;
case SPICE_BITMAP_FMT_16BIT:
#ifdef WORDS_BIGENDIAN