[Spice-commits] server/red-qxl.c server/red-qxl.h server/red-worker.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Wed Mar 23 14:26:13 UTC 2016
server/red-qxl.c | 3 ++-
server/red-qxl.h | 3 +++
server/red-worker.c | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 5c48cdc61d224a343d557f953e51fd073b5bedc6
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Wed Mar 23 14:09:40 2016 +0000
declare and use message for RED_WORKER_MESSAGE_GL_SCANOUT
All other messages (even empty ones) have a structure defined.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/server/red-qxl.c b/server/red-qxl.c
index 7ef9fe1..d6c2c64 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 = { /* empty */ };
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,
More information about the Spice-commits
mailing list