From 8fcb9d91b69abc72ddef31b9f2e8585580c6cad2 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 9 Jan 2013 12:52:08 +1000 Subject: dix: allow pixmap dirty helper to be used for non-shared pixmaps this allows the pixmap dirty helper to be used for reverse optimus, where the GPU wants to copy from the shared pixmap to its VRAM copy. [airlied: slave_dst is wrong name now but pointless ABI churn at this point] Reviewed-by: Keith Packard Signed-off-by: Dave Airlie --- dix/pixmap.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dix') diff --git a/dix/pixmap.c b/dix/pixmap.c index 241881262..fe9214739 100644 --- a/dix/pixmap.c +++ b/dix/pixmap.c @@ -243,6 +243,8 @@ Bool PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty, RegionPtr dirty_region) } dst = dirty->slave_dst->master_pixmap; + if (!dst) + dst = dirty->slave_dst; RegionTranslate(dirty_region, -dirty->x, -dirty->y); n = RegionNumRects(dirty_region); -- cgit v1.2.3