[Spice-commits] server/display-channel.c server/display-channel.h server/red-worker.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Tue Apr 26 15:29:38 UTC 2016


 server/display-channel.c |    7 -------
 server/display-channel.h |    2 --
 server/red-worker.c      |    5 +----
 3 files changed, 1 insertion(+), 13 deletions(-)

New commits:
commit c6b1fc3551aac646a9cb3d09aec2247bdcc882e2
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Mon Mar 21 18:07:49 2016 +0100

    worker: remove check for canvas during cursor connect
    
    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 <marcandre.lureau at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/server/display-channel.c b/server/display-channel.c
index 88dbc74..abc94d5 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 6b053de..d5356fc 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 241c300..aa04988 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)


More information about the Spice-commits mailing list