[PATCH 2/2] prime: Don't lose SourceValidate on PixmapSyncDirtyHelper no-ops
Chris Wilson
chris at chris-wilson.co.uk
Sun Apr 5 02:32:04 PDT 2015
We need to ignore the SourceValidate callback when copying across
framebuffer pixels to slaved scanouts so that the swcursor and such is
copied across (otherwise the swcursor SourceValidate would restore the
pristine frontbuffer hiding the cursor in the slaves). However, we need
to remember to put the SourceValidate callback back in place even for an
early exit.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Dave Airlie <airlied at redhat.com>
---
dix/pixmap.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dix/pixmap.c b/dix/pixmap.c
index 00e298f..d691127 100644
--- a/dix/pixmap.c
+++ b/dix/pixmap.c
@@ -234,6 +234,14 @@ Bool PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty, RegionPtr dirty_region)
PixmapPtr dst;
SourceValidateProcPtr SourceValidate;
+ RegionTranslate(dirty_region, dirty->x, dirty->y);
+ RegionIntersect(dirty_region, dirty_region, region);
+
+ if (RegionNil(dirty_region)) {
+ RegionUninit(dirty_region);
+ return FALSE;
+ }
+
/*
* SourceValidate is used by the software cursor code
* to pull the cursor off of the screen when reading
@@ -243,14 +251,6 @@ Bool PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty, RegionPtr dirty_region)
SourceValidate = pScreen->SourceValidate;
pScreen->SourceValidate = NULL;
- RegionTranslate(dirty_region, dirty->x, dirty->y);
- RegionIntersect(dirty_region, dirty_region, region);
-
- if (RegionNil(dirty_region)) {
- RegionUninit(dirty_region);
- return FALSE;
- }
-
dst = dirty->slave_dst->master_pixmap;
if (!dst)
dst = dirty->slave_dst;
--
2.1.4
More information about the xorg-devel
mailing list