[PATCH v3 7/9] Send current GL scanout to new client

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
---
 server/dcc.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/server/dcc.c b/server/dcc.c
index eb63ce6..58ae55c 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -445,6 +445,7 @@ void dcc_start(DisplayChannelClient *dcc)
 {
     DisplayChannel *display = DCC_TO_DC(dcc);
     RedChannelClient *rcc = RED_CHANNEL_CLIENT(dcc);
+    QXLInstance *qxl = red_worker_get_qxl(COMMON_CHANNEL(display)->worker);
 
     red_channel_client_push_set_ack(RED_CHANNEL_CLIENT(dcc));
 
@@ -464,6 +465,16 @@ void dcc_start(DisplayChannelClient *dcc)
         red_pipe_add_verb(rcc, SPICE_MSG_DISPLAY_MARK);
         dcc_create_all_streams(dcc);
     }
+
+    if (qxl->st->scanout.drm_dma_buf_fd >= 0) {
+        if (reds_stream_is_plain_unix(rcc->stream) &&
+            red_channel_client_test_remote_cap(rcc, SPICE_DISPLAY_CAP_GL_SCANOUT)) {
+            red_channel_client_pipe_add(rcc, dcc_gl_scanout_item_new(rcc, NULL, 0));
+            dcc_push_monitors_config(dcc);
+        } else {
+            spice_printerr("FIXME: GL not supported on this kind of connection");
+        }
+    }
 }
 
 static void dcc_destroy_stream_agents(DisplayChannelClient *dcc)
-- 
2.5.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]