[Spice-devel] [spice-common PATCH 7/7 v2] ppc: Fix alpha state checking on BE machines

Christophe Fergeau cfergeau at redhat.com
Wed Jul 8 08:28:34 PDT 2015


On Thu, Jul 02, 2015 at 04:01:44PM +0200, Lukas Venhoda wrote:
> When checking, whether we use alpha channel, we need to compare color
> format with constant with the same byte order.
> ---
> Changes since v1:
>  - New commit
> ---
>  common/canvas_base.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/canvas_base.c b/common/canvas_base.c
> index 4c1bd2c..c089dcc 100644
> --- a/common/canvas_base.c
> +++ b/common/canvas_base.c
> @@ -1267,7 +1267,7 @@ static pixman_image_t *canvas_get_image_internal(CanvasBase *canvas, SpiceImage
>             If so we convert here. */
> 
>          wanted_format = canvas_get_target_format(canvas,
> -                                                 surface_format == PIXMAN_a8r8g8b8);
> +                                                 surface_format == PIXMAN_LE_a8r8g8b8);
> 

There's a bit of code in the same method doing:
    if (descriptor->flags & SPICE_IMAGE_FLAGS_HIGH_BITS_SET &&
        descriptor->type != SPICE_IMAGE_TYPE_FROM_CACHE &&
#ifdef SW_CANVAS_CACHE
        descriptor->type != SPICE_IMAGE_TYPE_FROM_CACHE_LOSSLESS &&
#endif
        surface_format == PIXMAN_x8r8g8b8) {
        spice_pixman_fill_rect_rop(surface,
                                   0, 0,
                                   pixman_image_get_width(surface),
                                   pixman_image_get_height(surface),
                                   0xff000000U, SPICE_ROP_OR);
    }
does this need fixing too?

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150708/4aeea38d/attachment.sig>


More information about the Spice-devel mailing list