From 26b8b350628ec053217715e7a9cb77ff56e4f56e Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Thu, 24 May 2012 09:55:27 +0300 Subject: qxl_surface: normalize surface_send names, add option to surface_destroy to send/not send destroy message --- 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; } } -- cgit v1.2.3