[Spice-devel] [PATCH 2/6] LZ4: Adjust reading the top_down flag
Javier Celaya
javier.celaya at flexvm.es
Wed Jan 28 02:49:45 PST 2015
Adjust the way the top_down flag is read to the corresponding change in
the wire protocol.
---
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 cfbba5e..0dd438a 100644
--- a/common/canvas_base.c
+++ b/common/canvas_base.c
@@ -555,7 +555,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);
@@ -563,14 +563,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;
@@ -581,7 +581,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
More information about the Spice-devel
mailing list