summaryrefslogtreecommitdiff
path: root/src/sna/sna_display_fake.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-07-11 16:40:51 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-07-11 22:23:29 +0100
commitc604d1426cc11f9799044710acf1ef7d226d2604 (patch)
tree09c1aa25ae0fb460a5cf12156cf9d372f0a37086 /src/sna/sna_display_fake.c
parent07926bfe507071a3d46a2ec13bb86a36bc225761 (diff)
sna: Remove the duplicated open-coding of SetScreenPixmap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_display_fake.c')
-rw-r--r--src/sna/sna_display_fake.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/sna/sna_display_fake.c b/src/sna/sna_display_fake.c
index b4a5a943..113c44ac 100644
--- a/src/sna/sna_display_fake.c
+++ b/src/sna/sna_display_fake.c
@@ -199,54 +199,6 @@ sna_output_fake(struct sna *sna)
return true;
}
-struct sna_visit_set_pixmap_window {
- PixmapPtr old, new;
-};
-
-static int
-sna_visit_set_window_pixmap(WindowPtr window, pointer data)
-{
- struct sna_visit_set_pixmap_window *visit = data;
- ScreenPtr screen = window->drawable.pScreen;
-
- if (screen->GetWindowPixmap(window) == visit->old) {
- screen->SetWindowPixmap(window, visit->new);
- return WT_WALKCHILDREN;
- }
-
- return WT_DONTWALKCHILDREN;
-}
-
-static void
-migrate_dirty_tracking(struct sna *sna, PixmapPtr old_front)
-{
-#if HAS_PIXMAP_SHARING
- ScreenPtr screen = sna->scrn->pScreen;
- PixmapDirtyUpdatePtr dirty, safe;
-
- xorg_list_for_each_entry_safe(dirty, safe, &screen->pixmap_dirty_list, ent) {
- assert(dirty->src == old_front);
- if (dirty->src != old_front)
- continue;
-
- DamageUnregister(&dirty->src->drawable, dirty->damage);
- DamageDestroy(dirty->damage);
-
- dirty->damage = DamageCreate(NULL, NULL,
- DamageReportNone,
- TRUE, screen, screen);
- if (!dirty->damage) {
- xorg_list_del(&dirty->ent);
- free(dirty);
- continue;
- }
-
- DamageRegister(&sna->front->drawable, dirty->damage);
- dirty->src = sna->front;
- }
-#endif
-}
-
static Bool
sna_mode_resize(ScrnInfoPtr scrn, int width, int height)
{
@@ -279,17 +231,6 @@ sna_mode_resize(ScrnInfoPtr scrn, int width, int height)
scrn->virtualY = height;
scrn->displayWidth = width;
- /* Open-coded screen->SetScreenPixmap */
- migrate_dirty_tracking(sna, old_front);
-
- if (root(screen)) {
- struct sna_visit_set_pixmap_window visit;
-
- visit.old = old_front;
- visit.new = sna->front;
- TraverseTree(root(screen), sna_visit_set_window_pixmap, &visit);
- assert(screen->GetWindowPixmap(root(screen)) == sna->front);
- }
screen->SetScreenPixmap(sna->front);
assert(screen->GetScreenPixmap(screen) == sna->front);