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 <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie 2013-01-09 12:52:08 +10:00
parent 16077b81c5
commit 8fcb9d91b6
2 changed files with 3 additions and 0 deletions

View File

@ -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);

View File

@ -67,6 +67,7 @@ fbCreatePixmapBpp(ScreenPtr pScreen, int width, int height, int depth, int bpp,
pPixmap->devKind = paddedWidth;
pPixmap->refcnt = 1;
pPixmap->devPrivate.ptr = (pointer) ((char *) pPixmap + base + adjust);
pPixmap->master_pixmap = NULL;
#ifdef FB_DEBUG
pPixmap->devPrivate.ptr =