diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2015-11-30 18:19:30 +0000 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2015-12-03 23:51:18 +0000 |
commit | 1940972ca9f0ab70733804506e1ae400351a4dcb (patch) | |
tree | f07272adde19adbe9c6f639581cbac15398cea10 /server/display-channel.c | |
parent | dfaf83235f3021f8870a2bdee4820f43930b7ddd (diff) |
worker: move red_process_draw to display-channel.c
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Fabiano FidĂȘncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Diffstat (limited to 'server/display-channel.c')
-rw-r--r-- | server/display-channel.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/server/display-channel.c b/server/display-channel.c index 7aa54ede..fd3a592e 100644 --- a/server/display-channel.c +++ b/server/display-channel.c @@ -1098,9 +1098,9 @@ static int validate_drawable_bbox(DisplayChannel *display, RedDrawable *drawable * * @return initialized Drawable or NULL on failure */ -Drawable *display_channel_get_drawable(DisplayChannel *display, uint8_t effect, - RedDrawable *red_drawable, uint32_t group_id, - uint32_t process_commands_generation) +static Drawable *display_channel_get_drawable(DisplayChannel *display, uint8_t effect, + RedDrawable *red_drawable, uint32_t group_id, + uint32_t process_commands_generation) { Drawable *drawable; int x; @@ -1145,7 +1145,7 @@ Drawable *display_channel_get_drawable(DisplayChannel *display, uint8_t effect, * Add a Drawable to the items to draw. * On failure the Drawable is not added. */ -void display_channel_add_drawable(DisplayChannel *display, Drawable *drawable) +static void display_channel_add_drawable(DisplayChannel *display, Drawable *drawable) { int success = FALSE, surface_id = drawable->surface_id; RedDrawable *red_drawable = drawable->red_drawable; @@ -1195,6 +1195,23 @@ void display_channel_add_drawable(DisplayChannel *display, Drawable *drawable) #endif } +void display_channel_process_draw(DisplayChannel *display, RedDrawable *red_drawable, + uint32_t group_id, int process_commands_generation) +{ + Drawable *drawable = + display_channel_get_drawable(display, red_drawable->effect, red_drawable, group_id, + process_commands_generation); + + if (!drawable) { + return; + } + + display_channel_add_drawable(display, drawable); + + display_channel_drawable_unref(display, drawable); +} + + int display_channel_wait_for_migrate_data(DisplayChannel *display) { uint64_t end_time = red_get_monotonic_time() + DISPLAY_CLIENT_MIGRATE_DATA_TIMEOUT; |