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

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

 



Hi

> There's a bit of code in the same method doing:
> ...
> does this need fixing too?

To be honest... I don't know.
It works fine without changing it, and when I changed it, nothing changed :)

I imagine this snippet just makes sure, that alpha channel is 255 when using XRGB.

As I sad before, I tried to fix the minimum to make it work, so that I don't accidentally break anything.
I would do a more in depth testing, but the BE machine I was working on is ancient, and compiling on it takes ages.

Lukas

----- Original Message -----
> From: "Christophe Fergeau" <cfergeau@xxxxxxxxxx>
> To: "Lukas Venhoda" <lvenhoda@xxxxxxxxxx>
> Cc: spice-devel@xxxxxxxxxxxxxxxxxxxxx
> Sent: Wednesday, July 8, 2015 5:28:34 PM
> Subject: Re:  [spice-common PATCH 7/7 v2] ppc: Fix alpha state checking on BE machines
> 
> 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
> 
_______________________________________________
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]