[Spice-devel] [PATCH RFC 02/14] Pass surface directly for surface_read_bits
Frediano Ziglio
fziglio at redhat.com
Thu Sep 29 08:44:01 UTC 2016
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/display-channel.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/server/display-channel.c b/server/display-channel.c
index 99082e6..18f31dc 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -847,11 +847,10 @@ static void drawable_ref_surface_deps(DisplayChannel *display, Drawable *drawabl
}
}
-static void surface_read_bits(DisplayChannel *display, int surface_id,
+static void surface_read_bits(DisplayChannel *display, RedSurface *surface,
const SpiceRect *area, uint8_t *dest, int dest_stride)
{
SpiceCanvas *canvas;
- RedSurface *surface = &display->priv->surfaces[surface_id];
canvas = surface->context.canvas;
canvas->ops->read_bits(canvas, dest, dest_stride, area);
@@ -893,7 +892,7 @@ static void handle_self_bitmap(DisplayChannel *display, Drawable *drawable)
image->u.bitmap.data->flags |= SPICE_CHUNKS_FLAGS_FREE;
display_channel_draw(display, &red_drawable->self_bitmap_area, drawable->surface->id);
- surface_read_bits(display, drawable->surface->id,
+ surface_read_bits(display, drawable->surface,
&red_drawable->self_bitmap_area, dest, dest_stride);
/* For 32bit non-primary surfaces we need to keep any non-zero
--
2.7.4
More information about the Spice-devel
mailing list