summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2013-04-28 08:22:23 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2013-04-28 08:22:23 -0400
commit7b5d6e5a3f3b914fa7dc1a0b36cf1702ee3f94e2 (patch)
tree952e190ca82c7808272f4adadbc27a51261c831a
parentb634fd090c84528e862483ee2b0bf0c81b9ae0d0 (diff)
wip
-rw-r--r--src/qxl_surface.c39
1 files changed, 22 insertions, 17 deletions
diff --git a/src/qxl_surface.c b/src/qxl_surface.c
index 9573b09..9b97faa 100644
--- a/src/qxl_surface.c
+++ b/src/qxl_surface.c
@@ -23,6 +23,8 @@
/* A surface is a pixmap that can migrate between host and device memory.
*/
+/* FIXME: update documentation */
+
/* A surface can still exist even when the server is not actively using it
* Such a surface is said to be 'cached'.
*
@@ -907,24 +909,10 @@ qxl_surface_unref (mem_manager_t *mm, uint32_t id)
void
qxl_surface_kill (qxl_surface_t *surface)
{
- /* FIXME */
- /* Move to cached list */
-}
-
-static void
-move_to_front (qxl_surface_t *surface)
-{
xorg_list_del (&surface->link);
- xorg_list_add (&surface->mm->live_surfaces, &surface->link);
-}
-
-static Bool
-prepare_rendering (qxl_surface_t *surface)
-{
- /* FIXME */
- /* Move to video memory */
- /* Move to front of LRU */
- return FALSE;
+ if (surface->info)
+ surface->info->surface = NULL;
+ free (surface);
}
Bool
@@ -1001,6 +989,23 @@ print_region (const char *header, RegionPtr pRegion)
}
#endif // DEBUG_REGIONS
+static void
+move_to_front (qxl_surface_t *surface)
+{
+ xorg_list_del (&surface->link);
+ xorg_list_add (&surface->mm->live_surfaces, &surface->link);
+}
+
+static Bool
+prepare_rendering (qxl_surface_t *surface)
+{
+ if (!move_to_video (surface))
+ return FALSE;
+
+ move_to_front (surface);
+ return TRUE;
+}
+
/* solid */
Bool
qxl_surface_prepare_solid (qxl_surface_t *destination,