From c6b1fc3551aac646a9cb3d09aec2247bdcc882e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 21 Mar 2016 18:07:49 +0100 Subject: [PATCH] worker: remove check for canvas during cursor connect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We want the cursor to be initialized even if there is no canvas, especially when using a GL scanout. This solves some client warnings when using qemu with GL scanout-only (patches under review on qemu ML). Signed-off-by: Marc-André Lureau Acked-by: Frediano Ziglio --- server/display-channel.c | 7 ------- server/display-channel.h | 2 -- server/red-worker.c | 5 +---- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/server/display-channel.c b/server/display-channel.c index 88dbc74b..abc94d59 100644 --- a/server/display-channel.c +++ b/server/display-channel.c @@ -283,13 +283,6 @@ void display_channel_surface_unref(DisplayChannel *display, uint32_t surface_id) spice_warn_if_fail(ring_is_empty(&surface->depend_on_me)); } -/* TODO: perhaps rename to "ready" or "realized" ? */ -bool display_channel_surface_has_canvas(DisplayChannel *display, - uint32_t surface_id) -{ - return display->surfaces[surface_id].context.canvas != NULL; -} - static void streams_update_visible_region(DisplayChannel *display, Drawable *drawable) { Ring *ring; diff --git a/server/display-channel.h b/server/display-channel.h index 6b053de4..d5356fc2 100644 --- a/server/display-channel.h +++ b/server/display-channel.h @@ -283,8 +283,6 @@ Drawable * display_channel_drawable_try_new (DisplayCha void display_channel_drawable_unref (DisplayChannel *display, Drawable *drawable); void display_channel_surface_unref (DisplayChannel *display, uint32_t surface_id); -bool display_channel_surface_has_canvas (DisplayChannel *display, - uint32_t surface_id); void display_channel_current_flush (DisplayChannel *display, int surface_id); int display_channel_wait_for_migrate_data (DisplayChannel *display); diff --git a/server/red-worker.c b/server/red-worker.c index 241c3003..aa049887 100644 --- a/server/red-worker.c +++ b/server/red-worker.c @@ -565,10 +565,7 @@ static void cursor_connect(RedWorker *worker, RedClient *client, RedsStream *str red_channel_client_ack_zero_messages_window(rcc); red_channel_client_push_set_ack(rcc); - // TODO: why do we check for context.canvas? defer this to after display cc is connected - // and test it's canvas? this is just a test to see if there is an active renderer? - if (display_channel_surface_has_canvas(worker->display_channel, 0)) - cursor_channel_init(channel, ccc); + cursor_channel_init(channel, ccc); } static void handle_dev_update_async(void *opaque, void *payload)