qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 3/4] vnc-jobs: move buffer_reset to vnc_async_encodi


From: Peter Lieven
Subject: [Qemu-devel] [PATCH 3/4] vnc-jobs: move buffer_reset to vnc_async_encoding_end
Date: Thu, 27 Aug 2015 12:18:53 +0200

now that we are able to shrink the buffer it makes sense
to move the buffer_reset to vnc_async_encoding_end to
actually shrink the buffer when it is no longer used.

Signed-off-by: Peter Lieven <address@hidden>
---
 ui/vnc-jobs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c
index 22c9abc..201d9b7 100644
--- a/ui/vnc-jobs.c
+++ b/ui/vnc-jobs.c
@@ -195,8 +195,6 @@ static void vnc_async_encoding_start(VncState *orig, 
VncState *local)
     local->zrle = orig->zrle;
     local->output =  queue->buffer;
     local->csock = -1; /* Don't do any network work on this thread */
-
-    buffer_reset(&local->output);
 }
 
 static void vnc_async_encoding_end(VncState *orig, VncState *local)
@@ -208,6 +206,7 @@ static void vnc_async_encoding_end(VncState *orig, VncState 
*local)
     orig->lossy_rect = local->lossy_rect;
 
     queue->buffer = local->output;
+    buffer_reset(&queue->buffer);
 }
 
 static int vnc_worker_thread_loop(VncJobQueue *queue)
-- 
1.9.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]