summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2015-11-24 15:13:15 +0100
committerFrediano Ziglio <fziglio@redhat.com>2015-11-24 15:05:52 +0000
commitfcb57e686a2d946d7f193676ee070c3a6945d0a4 (patch)
treecce928f3e8f18ba8f0d768f9c49e8157792e5f1f /server
parent58e14915d8600a2fe1e6a7770e50a388d195db2f (diff)
downloadspice-fcb57e686a2d946d7f193676ee070c3a6945d0a4.zip
spice-fcb57e686a2d946d7f193676ee070c3a6945d0a4.tar.gz
spice-fcb57e686a2d946d7f193676ee070c3a6945d0a4.tar.xz
worker: Change validate_area to surface_update_dest
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Diffstat (limited to 'server')
-rw-r--r--server/red_worker.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/server/red_worker.c b/server/red_worker.c
index ba32ca8..1d95f8f 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -936,11 +936,8 @@ static void image_surface_init(DisplayChannel *display)
display->image_surfaces.ops = &image_surfaces_ops;
}
-static void validate_area(DisplayChannel *display, const SpiceRect *area, uint32_t surface_id)
+static void surface_update_dest(RedSurface *surface, const SpiceRect *area)
{
- RedSurface *surface;
-
- surface = &display->surfaces[surface_id];
if (!surface->context.canvas_draws_on_surface) {
SpiceCanvas *canvas = surface->context.canvas;
int h;
@@ -1037,7 +1034,7 @@ void display_channel_draw_till(DisplayChannel *display, const SpiceRect *area, i
drawable_draw(display, now);
display_channel_drawable_unref(display, now);
} while (now != surface_last);
- validate_area(display, area, surface_id);
+ surface_update_dest(surface, area);
}
void display_channel_draw(DisplayChannel *display, const SpiceRect *area, int surface_id)
@@ -1074,7 +1071,7 @@ void display_channel_draw(DisplayChannel *display, const SpiceRect *area, int su
region_destroy(&rgn);
if (!last) {
- validate_area(display, area, surface_id);
+ surface_update_dest(surface, area);
return;
}
@@ -1090,7 +1087,7 @@ void display_channel_draw(DisplayChannel *display, const SpiceRect *area, int su
drawable_draw(display, now);
display_channel_drawable_unref(display, now);
} while (now != last);
- validate_area(display, area, surface_id);
+ surface_update_dest(surface, area);
}
static int red_process_cursor(RedWorker *worker, uint32_t max_pipe_size, int *ring_is_empty)