[Spice-commits] 2 commits - configure.ac server/red-qxl.c server/red-qxl.h server/red-worker.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Mon Dec 12 11:46:45 UTC 2016


 configure.ac        |    4 +---
 server/red-qxl.c    |   12 +++++++-----
 server/red-qxl.h    |    4 ++++
 server/red-worker.c |    6 +++---
 4 files changed, 15 insertions(+), 11 deletions(-)

New commits:
commit a0bd1bfbd3ff88c07fcb469b64c150271c2b798a
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Mon Dec 12 11:19:21 2016 +0000

    build: Optimise headers check
    
    Check multiple headers using a single m4 macro.
    The resulting script is reduced.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Pavel Grunt <pgrunt at redhat.com>

diff --git a/configure.ac b/configure.ac
index c978b92..a78b4ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,9 +49,7 @@ AM_PROG_CC_C_O
 AC_C_BIGENDIAN
 PKG_PROG_PKG_CONFIG
 
-AC_CHECK_HEADERS([sys/time.h])
-AC_CHECK_HEADERS([execinfo.h])
-AC_CHECK_HEADERS([linux/sockios.h])
+AC_CHECK_HEADERS([sys/time.h execinfo.h linux/sockios.h])
 AC_FUNC_ALLOCA
 
 SPICE_LT_VERSION=m4_format("%d:%d:%d", SPICE_CURRENT, SPICE_REVISION, SPICE_AGE)
commit ed500d1a4c1e55f119aff307b840825b0483d31f
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Fri Dec 9 14:20:05 2016 +0000

    red-worker: Introduce RedWorkerMessageGlDraw structure
    
    All RedWorker messages starts with RedWorker except
    SpiceMsgDisplayGlDraw.
    For coherence introduce a RedWorkerMessageGlDraw structure
    holding just SpiceMsgDisplayGlDraw. This also allows possible
    extensions.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Pavel Grunt <pgrunt at redhat.com>

diff --git a/server/red-qxl.c b/server/red-qxl.c
index de0546f..b6b3770 100644
--- a/server/red-qxl.c
+++ b/server/red-qxl.c
@@ -907,11 +907,13 @@ void spice_qxl_gl_draw_async(QXLInstance *qxl,
 {
     QXLState *qxl_state;
     RedWorkerMessage message = RED_WORKER_MESSAGE_GL_DRAW_ASYNC;
-    SpiceMsgDisplayGlDraw draw = {
-        .x = x,
-        .y = y,
-        .w = w,
-        .h = h
+    RedWorkerMessageGlDraw draw = {
+        {
+            .x = x,
+            .y = y,
+            .w = w,
+            .h = h
+        },
     };
 
     spice_return_if_fail(qxl != NULL);
diff --git a/server/red-qxl.h b/server/red-qxl.h
index 7743124..0c9498a 100644
--- a/server/red-qxl.h
+++ b/server/red-qxl.h
@@ -298,6 +298,10 @@ typedef struct RedWorkerMessageGlScanout {
 typedef struct RedWorkerMessageClose {
 } RedWorkerMessageClose;
 
+typedef struct RedWorkerMessageGlDraw {
+    SpiceMsgDisplayGlDraw draw;
+} RedWorkerMessageGlDraw;
+
 enum {
     RED_DISPATCHER_PENDING_WAKEUP,
     RED_DISPATCHER_PENDING_OOM,
diff --git a/server/red-worker.c b/server/red-worker.c
index 9be4b99..d6a5e77 100644
--- a/server/red-worker.c
+++ b/server/red-worker.c
@@ -967,9 +967,9 @@ static
 void handle_dev_gl_draw_async(void *opaque, void *payload)
 {
     RedWorker *worker = opaque;
-    SpiceMsgDisplayGlDraw *draw = payload;
+    RedWorkerMessageGlDraw *draw = payload;
 
-    display_channel_gl_draw(worker->display_channel, draw);
+    display_channel_gl_draw(worker->display_channel, &draw->draw);
 }
 
 static void handle_dev_close(void *opaque, void *payload)
@@ -1227,7 +1227,7 @@ static void register_callbacks(Dispatcher *dispatcher)
     dispatcher_register_handler(dispatcher,
                                 RED_WORKER_MESSAGE_GL_DRAW_ASYNC,
                                 handle_dev_gl_draw_async,
-                                sizeof(SpiceMsgDisplayGlDraw),
+                                sizeof(RedWorkerMessageGlDraw),
                                 DISPATCHER_NONE);
     dispatcher_register_handler(dispatcher,
                                 RED_WORKER_MESSAGE_CLOSE_WORKER,


More information about the Spice-commits mailing list