[Spice-devel] [common PATCH 0/9 v4] Fix colors on BE clients, when using image compression

Christophe Fergeau cfergeau at redhat.com
Thu Dec 17 07:20:32 PST 2015


Hey,

I've pushed these except for the "Always convert surface" one.

Christophe

On Wed, Nov 25, 2015 at 05:14:26PM +0100, Lukas Venhoda wrote:
> When using image compression on BE client, the color order was wrong.
> (BGRA instead of ARGB)
> 
> Theese patches try to fix this issue in most of the image compressions.
> 
> For most of the fixes, new macros for color order were implemented.
> Theese macros changed according to the endianness of the machine it runs on.
> Original implementation is in QEMU in file qemu-pixman.h
> 
> Not all PIXMAN_[a-z] were changed. Most are needed for native ordering,
> and should be left as is. Only those creating new surfaces are changed.
> 
> The way this fix works is like this:
> We created a BGRx order surface and copy LE order data into it.
> This creates a surface ith "wrong" data order.
> We then create a second surface with xRGB color order and copy the data
> into it, which in turn converts (byteswap) the colors into correct order.
> 
> Lukas Venhoda (9):
>   ppc: Always convert surface on BE machine
>   pixman_utils: Add macros for color byte ordering
>   pixman_utils: Use PIXMAN_LE_ constants in spice_bitmap_try_as_pixman()
>   ppc: Add support for bigendian color byte order
>   ppc: Fix colors on ppc when using QUIC
>   ppc: Fix colors on ppc when using LZ
>   ppc: Fix colors on ppc when using LZ4
>   ppc: Fix colors on ppc when using jpeg
>   ppc: Fix alpha state checking on BE machines
> 
>  common/canvas_base.c  | 34 +++++++++++++++++++++++-----------
>  common/canvas_utils.c | 14 ++++++++++++++
>  common/pixman_utils.c | 18 +++---------------
>  common/pixman_utils.h | 10 ++++++++++
>  4 files changed, 50 insertions(+), 26 deletions(-)
> 
> --
> 2.5.0
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20151217/448a9aa5/attachment.sig>


More information about the Spice-devel mailing list