[Spice-devel] [PATCH] server: clean glz drawables when reseting qxl

Yonit Halperin yhalperi at redhat.com
Wed Aug 25 00:06:44 PDT 2010


When the we reset qxl, we destroy all srufaces. Since surfaces and glz
drawables are no longer dependent, we need to call red_display_clear_glz_drawables explicitly
in order to clear all our drawables references in the server.
---
 server/red_worker.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/server/red_worker.c b/server/red_worker.c
index 2ce15f5..b622011 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -9799,6 +9799,7 @@ static inline void handle_dev_destroy_surface_wait(RedWorker *worker)
     write_message(worker->channel, &message);
 }
 
+/* called upon device reset */
 static inline void handle_dev_destroy_surfaces(RedWorker *worker)
 {
     int i;
@@ -9833,6 +9834,8 @@ static inline void handle_dev_destroy_surfaces(RedWorker *worker)
         red_pipe_add_verb(&worker->display_channel->base, SPICE_MSG_DISPLAY_STREAM_DESTROY_ALL);
     }
 
+    red_display_clear_glz_drawables(worker->display_channel);
+
     //to handle better
     for (i = 0; i < NUM_SURFACES; ++i) {
         ASSERT(!worker->surfaces[i].context.canvas);
-- 
1.7.1.1



More information about the Spice-devel mailing list