summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-05-24 09:55:27 +0300
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-07-15 19:12:08 +0200
commit26b8b350628ec053217715e7a9cb77ff56e4f56e (patch)
tree2c77307fa5c6e746b0acd0cba75fed9cb55785ec
parent1db72fdf45a3ebbf7f0687671c1def75309b9499 (diff)
qxl_surface: normalize surface_send names, add option to surface_destroy to send/not send destroy message
-rw-r--r--src/qxl_surface.c13
1 files 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;
}
}