summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-09-16 17:01:24 +0200
committerFrediano Ziglio <fziglio@redhat.com>2015-11-10 09:35:42 +0000
commit1b9d767ca7cdde33d12d3700afeb433f2625f528 (patch)
tree45257a02b8e44cd77f96166866c21b5caf1c65e1
parent042652454615bc6c01102ac82b9f2b0b47f697c0 (diff)
downloadspice-1b9d767ca7cdde33d12d3700afeb433f2625f528.zip
spice-1b9d767ca7cdde33d12d3700afeb433f2625f528.tar.gz
spice-1b9d767ca7cdde33d12d3700afeb433f2625f528.tar.xz
worker s/surfaces_dest/surface_deps
Acked-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-rw-r--r--server/display-channel.h2
-rw-r--r--server/red_parse_qxl.c10
-rw-r--r--server/red_parse_qxl.h2
-rw-r--r--server/red_worker.c32
4 files changed, 23 insertions, 23 deletions
diff --git a/server/display-channel.h b/server/display-channel.h
index 827a9d4..ec1c483 100644
--- a/server/display-channel.h
+++ b/server/display-channel.h
@@ -174,7 +174,7 @@ struct Drawable {
DependItem depend_items[3];
int surface_id;
- int surfaces_dest[3];
+ int surface_deps[3];
uint32_t process_commands_generation;
};
diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c
index 5fc1a13..2cfd5ea 100644
--- a/server/red_parse_qxl.c
+++ b/server/red_parse_qxl.c
@@ -1028,7 +1028,7 @@ static int red_get_native_drawable(RedMemSlotInfo *slots, int group_id,
red->surface_id = qxl->surface_id;
for (i = 0; i < 3; i++) {
- red->surfaces_dest[i] = qxl->surfaces_dest[i];
+ red->surface_deps[i] = qxl->surfaces_dest[i];
red_get_rect_ptr(&red->surfaces_rects[i], &qxl->surfaces_rects[i]);
}
@@ -1110,9 +1110,9 @@ static int red_get_compat_drawable(RedMemSlotInfo *slots, int group_id,
red->self_bitmap = (qxl->bitmap_offset != 0);
red_get_rect_ptr(&red->self_bitmap_area, &qxl->bitmap_area);
- red->surfaces_dest[0] = -1;
- red->surfaces_dest[1] = -1;
- red->surfaces_dest[2] = -1;
+ red->surface_deps[0] = -1;
+ red->surface_deps[1] = -1;
+ red->surface_deps[2] = -1;
red->type = qxl->type;
switch (red->type) {
@@ -1132,7 +1132,7 @@ static int red_get_compat_drawable(RedMemSlotInfo *slots, int group_id,
break;
case QXL_COPY_BITS:
red_get_point_ptr(&red->u.copy_bits.src_pos, &qxl->u.copy_bits.src_pos);
- red->surfaces_dest[0] = 0;
+ red->surface_deps[0] = 0;
red->surfaces_rects[0].left = red->u.copy_bits.src_pos.x;
red->surfaces_rects[0].right = red->u.copy_bits.src_pos.x +
(red->bbox.right - red->bbox.left);
diff --git a/server/red_parse_qxl.h b/server/red_parse_qxl.h
index 3adc9fa..87862fa 100644
--- a/server/red_parse_qxl.h
+++ b/server/red_parse_qxl.h
@@ -35,7 +35,7 @@ typedef struct RedDrawable {
SpiceRect bbox;
SpiceClip clip;
uint32_t mm_time;
- int32_t surfaces_dest[3];
+ int32_t surface_deps[3];
SpiceRect surfaces_rects[3];
union {
SpiceFill fill;
diff --git a/server/red_worker.c b/server/red_worker.c
index d6e921a..30010f7 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -668,7 +668,7 @@ static inline void red_handle_drawable_surfaces_client_synced(
for (x = 0; x < 3; ++x) {
int surface_id;
- surface_id = drawable->surfaces_dest[x];
+ surface_id = drawable->surface_deps[x];
if (surface_id != -1) {
if (dcc->surface_client_created[surface_id] == TRUE) {
continue;
@@ -996,13 +996,13 @@ static void remove_depended_item(DependItem *item)
ring_remove(&item->ring_item);
}
-static inline void red_dec_surfaces_drawable_dependencies(RedWorker *worker, Drawable *drawable)
+static void drawable_unref_surface_deps(RedWorker *worker, Drawable *drawable)
{
int x;
int surface_id;
for (x = 0; x < 3; ++x) {
- surface_id = drawable->surfaces_dest[x];
+ surface_id = drawable->surface_deps[x];
if (surface_id == -1) {
continue;
}
@@ -1016,7 +1016,7 @@ static void remove_drawable_dependencies(RedWorker *worker, Drawable *drawable)
int surface_id;
for (x = 0; x < 3; ++x) {
- surface_id = drawable->surfaces_dest[x];
+ surface_id = drawable->surface_deps[x];
if (surface_id != -1 && drawable->depend_items[x].drawable) {
remove_depended_item(&drawable->depend_items[x]);
}
@@ -1039,7 +1039,7 @@ static void red_worker_drawable_unref(RedWorker *worker, Drawable *drawable)
region_destroy(&drawable->tree_item.base.rgn);
remove_drawable_dependencies(worker, drawable);
- red_dec_surfaces_drawable_dependencies(worker, drawable);
+ drawable_unref_surface_deps(worker, drawable);
red_surface_unref(worker, drawable->surface_id);
RING_FOREACH_SAFE(item, next, &drawable->glz_ring) {
@@ -1119,7 +1119,7 @@ static void red_flush_source_surfaces(RedWorker *worker, Drawable *drawable)
int surface_id;
for (x = 0; x < 3; ++x) {
- surface_id = drawable->surfaces_dest[x];
+ surface_id = drawable->surface_deps[x];
if (surface_id != -1 && drawable->depend_items[x].drawable) {
remove_depended_item(&drawable->depend_items[x]);
surface_flush(worker, surface_id, &drawable->red_drawable->surfaces_rects[x]);
@@ -1238,7 +1238,7 @@ static int red_clear_surface_drawables_from_pipe(DisplayChannelClient *dcc, int
}
for (x = 0; x < 3; ++x) {
- if (drawable->surfaces_dest[x] == surface_id) {
+ if (drawable->surface_deps[x] == surface_id) {
depend_found = TRUE;
break;
}
@@ -2504,7 +2504,7 @@ static inline int is_drawable_independent_from_surfaces(Drawable *drawable)
int x;
for (x = 0; x < 3; ++x) {
- if (drawable->surfaces_dest[x] != -1) {
+ if (drawable->surface_deps[x] != -1) {
return FALSE;
}
}
@@ -3083,8 +3083,8 @@ static Drawable *get_drawable(RedWorker *worker, uint8_t effect, RedDrawable *re
return NULL;
}
for (x = 0; x < 3; ++x) {
- if (red_drawable->surfaces_dest[x] != -1) {
- VALIDATE_SURFACE_RETVAL(worker, red_drawable->surfaces_dest[x], NULL)
+ if (red_drawable->surface_deps[x] != -1) {
+ VALIDATE_SURFACE_RETVAL(worker, red_drawable->surface_deps[x], NULL)
}
}
@@ -3106,7 +3106,7 @@ static Drawable *get_drawable(RedWorker *worker, uint8_t effect, RedDrawable *re
drawable->group_id = group_id;
drawable->surface_id = red_drawable->surface_id;
- memcpy(drawable->surfaces_dest, red_drawable->surfaces_dest, sizeof(drawable->surfaces_dest));
+ memcpy(drawable->surface_deps, red_drawable->surface_deps, sizeof(drawable->surface_deps));
ring_init(&drawable->pipes);
ring_init(&drawable->glz_ring);
@@ -3154,11 +3154,11 @@ static inline int red_handle_surfaces_dependencies(RedWorker *worker, Drawable *
for (x = 0; x < 3; ++x) {
// surface self dependency is handled by shadows in "current", or by
// handle_self_bitmap
- if (drawable->surfaces_dest[x] != drawable->surface_id) {
- add_to_surface_dependency(worker, drawable->surfaces_dest[x],
+ if (drawable->surface_deps[x] != drawable->surface_id) {
+ add_to_surface_dependency(worker, drawable->surface_deps[x],
&drawable->depend_items[x], drawable);
- if (drawable->surfaces_dest[x] == 0) {
+ if (drawable->surface_deps[x] == 0) {
QRegion depend_region;
region_init(&depend_region);
region_add(&depend_region, &drawable->red_drawable->surfaces_rects[x]);
@@ -3177,7 +3177,7 @@ static inline void red_inc_surfaces_drawable_dependencies(RedWorker *worker, Dra
RedSurface *surface;
for (x = 0; x < 3; ++x) {
- surface_id = drawable->surfaces_dest[x];
+ surface_id = drawable->surface_deps[x];
if (surface_id == -1) {
continue;
}
@@ -5758,7 +5758,7 @@ static inline int drawable_depends_on_areas(Drawable *drawable,
int dep_surface_id;
for (x = 0; x < 3; ++x) {
- dep_surface_id = drawable->surfaces_dest[x];
+ dep_surface_id = drawable->surface_deps[x];
if (dep_surface_id == surface_ids[i]) {
if (rect_intersects(&surface_areas[i], &red_drawable->surfaces_rects[x])) {
return TRUE;