[Spice-devel] [PATCH xf86-qxl 10/27] qxl_surface: normalize surface_send names, add option to surface_destroy to send/not send destroy message

Marc-André Lureau marcandre.lureau at gmail.com
Mon Jul 16 08:38:34 PDT 2012


From: Alon Levy <alevy at redhat.com>

---
 src/qxl_surface.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/qxl_surface.c b/src/qxl_surface.c
index 347503d..aef90ec 100644
--- a/src/qxl_surface.c
+++ b/src/qxl_surface.c
@@ -752,7 +752,7 @@ unlink_surface (qxl_surface_t *surface)
 }
 
 static void
-send_destroy (qxl_surface_t *surface)
+surface_destroy (qxl_surface_t *surface)
 {
     struct QXLSurfaceCmd *cmd;
 
@@ -760,9 +760,12 @@ send_destroy (qxl_surface_t *surface)
 	pixman_image_unref (surface->dev_image);
     if (surface->host_image)
 	pixman_image_unref (surface->host_image);
-    
+
+#if 0
+    ErrorF("destroy %ld\n", (long int)surface->end - (long int)surface->address);
+#endif
     cmd = make_surface_cmd (surface->cache, surface->id, QXL_SURFACE_CMD_DESTROY);
-    
+
     push_surface_cmd (surface->cache, cmd);
 }
 
@@ -844,7 +847,7 @@ qxl_surface_unref (surface_cache_t *cache, uint32_t id)
 	qxl_surface_t *surface = cache->all_surfaces + id;
 
 	if (--surface->ref_count == 0)
-	    send_destroy (surface);
+	    surface_destroy (surface);
     }
 }
 
@@ -1096,7 +1099,7 @@ qxl_surface_cache_evacuate_all (surface_cache_t *cache)
     {
 	if (cache->cached_surfaces[i])
 	{
-	    send_destroy (cache->cached_surfaces[i]);
+            surface_destroy (cache->cached_surfaces[i]);
 	    cache->cached_surfaces[i] = NULL;
 	}
     }
-- 
1.7.10.4



More information about the Spice-devel mailing list