Re: [PATCH 3/6] LZ4: Correctly read the top_down flag

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

 



'correctly' as in "adjust to the corresponding changes in the wire
protocol", right ?

Christophe

On Thu, Jan 22, 2015 at 05:21:21PM +0100, Javier Celaya wrote:
> ---
>  common/canvas_base.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/common/canvas_base.c b/common/canvas_base.c
> index 0f6b7f4..ec83123 100644
> --- a/common/canvas_base.c
> +++ b/common/canvas_base.c
> @@ -566,7 +566,7 @@ static pixman_image_t *canvas_get_lz4(CanvasBase *canvas, SpiceImage *image, int
>      int stride;
>      int stride_abs;
>      uint8_t *dest, *data, *data_end;
> -    int width, height, direction;
> +    int width, height, top_down;
>      LZ4_streamDecode_t *stream;
>  
>      spice_chunks_linearize(image->u.lz4.data);
> @@ -574,14 +574,14 @@ static pixman_image_t *canvas_get_lz4(CanvasBase *canvas, SpiceImage *image, int
>      data_end = data + image->u.lz4.data->chunk[0].len;
>      width = image->descriptor.width;
>      height = image->descriptor.height;
> -    direction = *(data++);
> +    top_down = *(data++);
>  
>      surface = surface_create(
>  #ifdef WIN32
>                               canvas->dc,
>  #endif
>                               PIXMAN_a8r8g8b8,
> -                             width, height, direction == 0);
> +                             width, height, top_down);
>      if (surface == NULL) {
>          spice_warning("create surface failed");
>          return NULL;
> @@ -592,7 +592,7 @@ static pixman_image_t *canvas_get_lz4(CanvasBase *canvas, SpiceImage *image, int
>      stride = pixman_image_get_stride(surface);
>      stride_abs = abs(stride);
>      available = height * stride_abs;
> -    if (direction == 1) {
> +    if (!top_down) {
>          dest -= (stride_abs * (height - 1));
>      }
>  
> -- 
> 1.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: pgpeF3mfHvu5x.pgp
Description: PGP signature

_______________________________________________
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]