[PATCH] Make red_process_surface accept DisplayChannel instead of RedWorker

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

 



Make clear this function work on DisplayChannel.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/red_worker.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/server/red_worker.c b/server/red_worker.c
index ebb2bba..ae9d8ad 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -420,10 +420,9 @@ cleanup:
 }
 
 
-static inline void red_process_surface(RedWorker *worker, RedSurfaceCmd *surface,
+static inline void red_process_surface(DisplayChannel *display, RedSurfaceCmd *surface,
                                        uint32_t group_id, int loadvm)
 {
-    DisplayChannel *display = worker->display_channel;
     uint32_t surface_id;
     RedSurface *red_surface;
     uint8_t *data;
@@ -449,7 +448,7 @@ static inline void red_process_surface(RedWorker *worker, RedSurfaceCmd *surface
         if (stride < 0) {
             data -= (int32_t)(stride * (height - 1));
         }
-        display_channel_create_surface(worker->display_channel, surface_id, surface->u.surface_create.width,
+        display_channel_create_surface(display, surface_id, surface->u.surface_create.width,
                                        height, stride, surface->u.surface_create.format, data,
                                        reloaded_surface,
                                        // reloaded surfaces will be sent on demand
@@ -627,7 +626,7 @@ static int red_process_commands(RedWorker *worker, uint32_t max_pipe_size, int *
                 free(surface);
                 break;
             }
-            red_process_surface(worker, surface, ext_cmd.group_id, FALSE);
+            red_process_surface(worker->display_channel, surface, ext_cmd.group_id, FALSE);
             break;
         }
         default:
@@ -1644,7 +1643,7 @@ static int loadvm_command(RedWorker *worker, QXLCommandExt *ext)
             free(surface_cmd);
             return FALSE;
         }
-        red_process_surface(worker, surface_cmd, ext->group_id, TRUE);
+        red_process_surface(worker->display_channel, surface_cmd, ext->group_id, TRUE);
         break;
     default:
         spice_warning("unhandled loadvm command type (%d)", ext->cmd.type);
-- 
2.4.3

_______________________________________________
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]