summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-09-26 23:12:01 +0200
committerFabiano Fidêncio <fidencio@redhat.com>2015-02-23 23:00:40 +0100
commit4eaed2fc6ed22b35b35332dab9f6be4c1eb0a74c (patch)
tree9a2a204766aa9fd8d90132ed13f1d1f973662fad /server
parent18475e08235a3cfc1273a32b5947714f136009f6 (diff)
downloadspice-4eaed2fc6ed22b35b35332dab9f6be4c1eb0a74c.tar.gz
spice-4eaed2fc6ed22b35b35332dab9f6be4c1eb0a74c.tar.xz
spice-4eaed2fc6ed22b35b35332dab9f6be4c1eb0a74c.zip
worker: rename update_area
Diffstat (limited to 'server')
-rw-r--r--server/display_channel.c13
-rw-r--r--server/display_channel.h10
-rw-r--r--server/red_worker.c24
3 files changed, 26 insertions, 21 deletions
diff --git a/server/display_channel.c b/server/display_channel.c
index 18514c40..e8a4c673 100644
--- a/server/display_channel.c
+++ b/server/display_channel.c
@@ -762,9 +762,10 @@ static int current_add(DisplayChannel *display, Ring *ring, Drawable *drawable)
current_add_drawable(display, drawable, ring);
} else {
/*
- * red_detach_streams_behind can affect the current tree since it may
- * trigger calls to update_area. Thus, the drawable should be added to the tree
- * before calling red_detach_streams_behind
+ * red_detach_streams_behind can affect the current tree since
+ * it may trigger calls to display_channel_draw. Thus, the
+ * drawable should be added to the tree before calling
+ * red_detach_streams_behind
*/
current_add_drawable(display, drawable, ring);
if (is_primary_surface(display, drawable->surface_id)) {
@@ -1106,7 +1107,7 @@ void display_channel_drawable_unref(DisplayChannel *display, Drawable *drawable)
display->drawable_count--;
}
-static void drawable_deps_update(DisplayChannel *display, Drawable *drawable)
+static void drawable_deps_draw(DisplayChannel *display, Drawable *drawable)
{
int x;
int surface_id;
@@ -1115,7 +1116,7 @@ static void drawable_deps_update(DisplayChannel *display, Drawable *drawable)
surface_id = drawable->surface_deps[x];
if (surface_id != -1 && drawable->depend_items[x].drawable) {
depended_item_remove(&drawable->depend_items[x]);
- red_update_area(display, &drawable->red_drawable->surfaces_rects[x], surface_id);
+ display_channel_draw(display, &drawable->red_drawable->surfaces_rects[x], surface_id);
}
}
}
@@ -1126,7 +1127,7 @@ void drawable_draw(DisplayChannel *display, Drawable *drawable)
SpiceCanvas *canvas;
SpiceClip clip = drawable->red_drawable->clip;
- drawable_deps_update(display, drawable);
+ drawable_deps_draw(display, drawable);
surface = &display->surfaces[drawable->surface_id];
canvas = surface->context.canvas;
diff --git a/server/display_channel.h b/server/display_channel.h
index 08d033ff..55dde1d1 100644
--- a/server/display_channel.h
+++ b/server/display_channel.h
@@ -235,6 +235,13 @@ typedef struct UpgradeItem {
} UpgradeItem;
+void display_channel_draw (DisplayChannel *display,
+ const SpiceRect *area,
+ int surface_id);
+void display_channel_draw_till (DisplayChannel *display,
+ const SpiceRect *area,
+ int surface_id,
+ Drawable *last);
void display_channel_free_some (DisplayChannel *display);
void display_channel_set_stream_video (DisplayChannel *display,
int stream_video);
@@ -386,8 +393,5 @@ void detach_streams_behind(DisplayChannel *display, QRegion *region, Drawable *d
void drawable_draw(DisplayChannel *display, Drawable *item);
void current_remove_all(DisplayChannel *display, int surface_id);
void drawables_init(DisplayChannel *display);
-void red_update_area(DisplayChannel *display, const SpiceRect *area, int surface_id);
-void red_update_area_till(DisplayChannel *display, const SpiceRect *area, int surface_id,
- Drawable *last);
#endif /* DISPLAY_CHANNEL_H_ */
diff --git a/server/red_worker.c b/server/red_worker.c
index d49d51ed..41a32034 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -484,9 +484,9 @@ static void dcc_detach_stream_gracefully(DisplayChannelClient *dcc,
stream_id, stream->current != NULL);
rect_debug(&upgrade_area);
if (update_area_limit) {
- red_update_area_till(DCC_TO_DC(dcc), &upgrade_area, 0, update_area_limit);
+ display_channel_draw_till(DCC_TO_DC(dcc), &upgrade_area, 0, update_area_limit);
} else {
- red_update_area(DCC_TO_DC(dcc), &upgrade_area, 0);
+ display_channel_draw(DCC_TO_DC(dcc), &upgrade_area, 0);
}
dcc_add_surface_area_image(dcc, 0, &upgrade_area, NULL, FALSE);
}
@@ -574,7 +574,7 @@ static void red_get_area(DisplayChannel *display, int surface_id, const SpiceRec
surface = &display->surfaces[surface_id];
if (update) {
- red_update_area(display, area, surface_id);
+ display_channel_draw(display, area, surface_id);
}
canvas = surface->context.canvas;
@@ -654,7 +654,7 @@ static inline int red_handle_depends_on_target_surface(DisplayChannel *display,
Drawable *drawable;
DependItem *depended_item = SPICE_CONTAINEROF(ring_item, DependItem, ring_item);
drawable = depended_item->drawable;
- red_update_area(display, &drawable->red_drawable->bbox, drawable->surface_id);
+ display_channel_draw(display, &drawable->red_drawable->bbox, drawable->surface_id);
}
return TRUE;
@@ -888,7 +888,7 @@ static void validate_area(DisplayChannel *display, const SpiceRect *area, uint32
Renders drawables for updating the requested area, but only drawables that are older
than 'last' (exclusive).
*/
-void red_update_area_till(DisplayChannel *display, const SpiceRect *area, int surface_id,
+void display_channel_draw_till(DisplayChannel *display, const SpiceRect *area, int surface_id,
Drawable *last)
{
RedSurface *surface;
@@ -955,10 +955,10 @@ void red_update_area_till(DisplayChannel *display, const SpiceRect *area, int su
container = now->tree_item.base.container;
current_remove_drawable(display, now);
container_cleanup(container);
- /* drawable_draw may call red_update_area for the surfaces 'now' depends on. Notice,
- that it is valid to call red_update_area in this case and not red_update_area_till:
+ /* drawable_draw may call display_channel_draw for the surfaces 'now' depends on. Notice,
+ that it is valid to call display_channel_draw in this case and not display_channel_draw_till:
It is impossible that there was newer item then 'last' in one of the surfaces
- that red_update_area is called for, Otherwise, 'now' would have already been rendered.
+ that display_channel_draw is called for, Otherwise, 'now' would have already been rendered.
See the call for red_handle_depends_on_target_surface in red_process_draw */
drawable_draw(display, now);
display_channel_drawable_unref(display, now);
@@ -966,7 +966,7 @@ void red_update_area_till(DisplayChannel *display, const SpiceRect *area, int su
validate_area(display, area, surface_id);
}
-void red_update_area(DisplayChannel *display, const SpiceRect *area, int surface_id)
+void display_channel_draw(DisplayChannel *display, const SpiceRect *area, int surface_id)
{
RedSurface *surface;
Ring *ring;
@@ -1175,7 +1175,7 @@ static int red_process_commands(RedWorker *worker, uint32_t max_pipe_size, int *
spice_warning("Invalid surface in QXL_CMD_UPDATE");
break;
}
- red_update_area(worker->display_channel, &update.area, update.surface_id);
+ display_channel_draw(worker->display_channel, &update.area, update.surface_id);
worker->qxl->st->qif->notify_update(worker->qxl, update.update_id);
release_info_ext.group_id = ext_cmd.group_id;
release_info_ext.info = update.release_info;
@@ -1813,7 +1813,7 @@ static void red_add_lossless_drawable_dependencies(RedChannelClient *rcc,
} else {
sync_rendered = FALSE;
for (i = 0; i < num_deps; i++) {
- red_update_area_till(display, deps_areas[i],
+ display_channel_draw_till(display, deps_areas[i],
deps_surfaces_ids[i], item);
}
}
@@ -4449,7 +4449,7 @@ void display_channel_update(DisplayChannel *display,
spice_return_if_fail(validate_surface(display, surface_id));
red_get_rect_ptr(&rect, area);
- red_update_area(display, &rect, surface_id);
+ display_channel_draw(display, &rect, surface_id);
surface = &display->surfaces[surface_id];
if (!*qxl_dirty_rects) {