From: Marc-André Lureau <marcandre.lureau@xxxxxxxxx> --- server/red_worker.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/server/red_worker.c b/server/red_worker.c index 6becc56..640dff5 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -745,15 +745,15 @@ static inline void set_surface_release_info(QXLReleaseInfoExt *release_info_ext, release_info_ext->group_id = group_id; } -static RedDrawable *ref_red_drawable(RedDrawable *drawable) +static RedDrawable *red_drawable_ref(RedDrawable *drawable) { drawable->refs++; return drawable; } -static inline void put_red_drawable(RedWorker *worker, RedDrawable *red_drawable, - uint32_t group_id) +static void red_drawable_unref(RedWorker *worker, RedDrawable *red_drawable, + uint32_t group_id) { QXLReleaseInfoExt release_info_ext; @@ -829,7 +829,7 @@ void display_channel_drawable_unref(DisplayChannel *display, Drawable *drawable) SPICE_CONTAINEROF(item, RedGlzDrawable, drawable_link)->drawable = NULL; ring_remove(item); } - put_red_drawable(COMMON_CHANNEL(display)->worker, drawable->red_drawable, drawable->group_id); + red_drawable_unref(COMMON_CHANNEL(display)->worker, drawable->red_drawable, drawable->group_id); drawable_free(display, drawable); display->drawable_count--; } @@ -2565,7 +2565,7 @@ static Drawable *get_drawable(RedWorker *worker, uint8_t effect, RedDrawable *re drawable->tree_item.base.type = TREE_ITEM_TYPE_DRAWABLE; region_init(&drawable->tree_item.base.rgn); drawable->tree_item.effect = effect; - drawable->red_drawable = ref_red_drawable(red_drawable); + drawable->red_drawable = red_drawable_ref(red_drawable); drawable->group_id = group_id; drawable->surface_id = red_drawable->surface_id; @@ -3192,7 +3192,7 @@ static int red_process_commands(RedWorker *worker, uint32_t max_pipe_size, int * red_process_draw(worker, red_drawable, ext_cmd.group_id); } // release the red_drawable - put_red_drawable(worker, red_drawable, ext_cmd.group_id); + red_drawable_unref(worker, red_drawable, ext_cmd.group_id); break; } case QXL_CMD_UPDATE: { @@ -3437,7 +3437,7 @@ static RedGlzDrawable *red_display_get_glz_drawable(DisplayChannelClient *dcc, D ret = spice_new(RedGlzDrawable, 1); ret->dcc = dcc; - ret->red_drawable = ref_red_drawable(drawable->red_drawable); + ret->red_drawable = red_drawable_ref(drawable->red_drawable); ret->drawable = drawable; ret->group_id = drawable->group_id; ret->instances_count = 0; @@ -3505,8 +3505,8 @@ void dcc_free_glz_drawable_instance(DisplayChannelClient *dcc, if (drawable) { ring_remove(&glz_drawable->drawable_link); } - put_red_drawable(worker, glz_drawable->red_drawable, - glz_drawable->group_id); + red_drawable_unref(worker, glz_drawable->red_drawable, + glz_drawable->group_id); worker->glz_drawable_count--; if (ring_item_is_linked(&glz_drawable->link)) { ring_remove(&glz_drawable->link); -- 2.4.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel