[spice-common PATCH 2/2] ppc: Fix colors on ppc when using QUIC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixes color order on PowerPC when using QUIC image compression.
---
 common/canvas_base.c  |  6 +++---
 common/canvas_utils.c | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/common/canvas_base.c b/common/canvas_base.c
index 6f48340..31f3cef 100644
--- a/common/canvas_base.c
+++ b/common/canvas_base.c
@@ -406,19 +406,19 @@ static pixman_image_t *canvas_get_quic(CanvasBase *canvas, SpiceImage *image,
     switch (type) {
     case QUIC_IMAGE_TYPE_RGBA:
         as_type = QUIC_IMAGE_TYPE_RGBA;
-        pixman_format = PIXMAN_a8r8g8b8;
+        pixman_format = PIXMAN_LE_a8r8g8b8;
         break;
     case QUIC_IMAGE_TYPE_RGB32:
     case QUIC_IMAGE_TYPE_RGB24:
         as_type = QUIC_IMAGE_TYPE_RGB32;
-        pixman_format = PIXMAN_x8r8g8b8;
+        pixman_format = PIXMAN_LE_x8r8g8b8;
         break;
     case QUIC_IMAGE_TYPE_RGB16:
         if (!want_original &&
             (canvas->format == SPICE_SURFACE_FMT_32_xRGB ||
              canvas->format == SPICE_SURFACE_FMT_32_ARGB)) {
             as_type = QUIC_IMAGE_TYPE_RGB32;
-            pixman_format = PIXMAN_x8r8g8b8;
+            pixman_format = PIXMAN_LE_x8r8g8b8;
         } else {
             as_type = QUIC_IMAGE_TYPE_RGB16;
             pixman_format = PIXMAN_x1r5g5b5;
diff --git a/common/canvas_utils.c b/common/canvas_utils.c
index 0d1591a..e59ced7 100644
--- a/common/canvas_utils.c
+++ b/common/canvas_utils.c
@@ -160,12 +160,12 @@ pixman_image_t * surface_create(pixman_format_code_t format, int width, int heig

         bitmap_info.inf.bmiHeader.biPlanes = 1;
         switch (format) {
-        case PIXMAN_a8r8g8b8:
-        case PIXMAN_x8r8g8b8:
+        case PIXMAN_LE_a8r8g8b8:
+        case PIXMAN_LE_x8r8g8b8:
             bitmap_info.inf.bmiHeader.biBitCount = 32;
             nstride = width * 4;
             break;
-        case PIXMAN_r8g8b8:
+        case PIXMAN_LE_r8g8b8:
             bitmap_info.inf.bmiHeader.biBitCount = 24;
             nstride = SPICE_ALIGN(width * 3, 4);
             break;
@@ -233,11 +233,11 @@ pixman_image_t * surface_create(pixman_format_code_t format, int width, int heig
         // NOTE: we assume here that the lz decoders always decode to RGB32.
         int stride = 0;
         switch (format) {
-        case PIXMAN_a8r8g8b8:
-        case PIXMAN_x8r8g8b8:
+        case PIXMAN_LE_a8r8g8b8:
+        case PIXMAN_LE_x8r8g8b8:
             stride = width * 4;
             break;
-        case PIXMAN_r8g8b8:
+        case PIXMAN_LE_r8g8b8:
             // NOTE: LZ4 also decodes to RGB24
             stride = SPICE_ALIGN(width * 3, 4);
             break;
--
2.4.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]