[PATCH] declare and use message for RED_WORKER_MESSAGE_GL_SCANOUT

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

 



All other messages (even empty ones) have a structure defined.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/red-qxl.c    | 3 ++-
 server/red-qxl.h    | 3 +++
 server/red-worker.c | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/server/red-qxl.c b/server/red-qxl.c
index 7ef9fe1..4c1c3e6 100644
--- a/server/red-qxl.c
+++ b/server/red-qxl.c
@@ -853,6 +853,7 @@ void spice_qxl_gl_scanout(QXLInstance *qxl,
                           uint32_t stride, uint32_t format,
                           int y_0_top)
 {
+    RedWorkerMessageGlScanout payload;
     spice_return_if_fail(qxl != NULL);
 
     QXLState *qxl_state = qxl->st;
@@ -877,7 +878,7 @@ void spice_qxl_gl_scanout(QXLInstance *qxl,
 
     /* FIXME: find a way to coallesce all pending SCANOUTs */
     dispatcher_send_message(&qxl_state->dispatcher,
-                            RED_WORKER_MESSAGE_GL_SCANOUT, NULL);
+                            RED_WORKER_MESSAGE_GL_SCANOUT, &payload);
 }
 
 SPICE_GNUC_VISIBLE
diff --git a/server/red-qxl.h b/server/red-qxl.h
index 7287740..c7996e2 100644
--- a/server/red-qxl.h
+++ b/server/red-qxl.h
@@ -284,6 +284,9 @@ typedef struct RedWorkerMessageMonitorsConfigAsync {
 typedef struct RedWorkerMessageDriverUnload {
 } RedWorkerMessageDriverUnload;
 
+typedef struct RedWorkerMessageGlScanout {
+} RedWorkerMessageGlScanout;
+
 enum {
     RED_DISPATCHER_PENDING_WAKEUP,
     RED_DISPATCHER_PENDING_OOM,
diff --git a/server/red-worker.c b/server/red-worker.c
index 8ca11c7..8dacc87 100644
--- a/server/red-worker.c
+++ b/server/red-worker.c
@@ -1381,7 +1381,7 @@ static void register_callbacks(Dispatcher *dispatcher)
     dispatcher_register_handler(dispatcher,
                                 RED_WORKER_MESSAGE_GL_SCANOUT,
                                 handle_dev_gl_scanout,
-                                0,
+                                sizeof(RedWorkerMessageGlScanout),
                                 DISPATCHER_NONE);
     dispatcher_register_handler(dispatcher,
                                 RED_WORKER_MESSAGE_GL_DRAW_ASYNC,
-- 
2.5.5

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://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]