xserver: Branch 'master' - 2 commits

Keith Packard keithp at kemper.freedesktop.org
Wed Nov 18 13:35:00 PST 2009


 exa/exa_migration_mixed.c |   24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

New commits:
commit d4fc245115eb2cb323e06a82f9dd52518d9b6a16
Author: Maarten Maathuis <madman2003 at gmail.com>
Date:   Wed Nov 18 21:23:09 2009 +0100

    exa/mixed: be more thorough about setting fb_pitch when needed
    
    Signed-off-by: Maarten Maathuis <madman2003 at gmail.com>
    Acked-by: Michel Dänzer <michel at daenzer.net>

diff --git a/exa/exa_migration_mixed.c b/exa/exa_migration_mixed.c
index ea6f878..121a4ad 100644
--- a/exa/exa_migration_mixed.c
+++ b/exa/exa_migration_mixed.c
@@ -98,14 +98,17 @@ exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
 	if (!pExaPixmap->driverPriv)
 	    exaCreateDriverPixmap_mixed(pPixmap);
 
-	if (pExaPixmap->pDamage && exaPixmapIsOffscreen(pPixmap)) {
-	    ExaScreenPriv(pPixmap->drawable.pScreen);
-
+	if (exaPixmapIsOffscreen(pPixmap)) {
 	    pPixmap->devKind = pExaPixmap->fb_pitch;
-	    exaCopyDirtyToFb(pixmaps + i);
 
-	    if (pExaScr->deferred_mixed_pixmap == pPixmap)
-		pExaScr->deferred_mixed_pixmap = NULL;
+	    if (pExaPixmap->pDamage) {
+		ExaScreenPriv(pPixmap->drawable.pScreen);
+
+		exaCopyDirtyToFb(pixmaps + i);
+
+		if (pExaScr->deferred_mixed_pixmap == pPixmap)
+		    pExaScr->deferred_mixed_pixmap = NULL;
+	    }
 	}
 
 	pExaPixmap->offscreen = exaPixmapIsOffscreen(pPixmap);
@@ -133,8 +136,9 @@ exaMoveInPixmap_mixed(PixmapPtr pPixmap)
 void
 exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
 {
+    ExaPixmapPriv(pPixmap);
+
     if (!ExaDoPrepareAccess(pPixmap, index)) {
-	ExaPixmapPriv(pPixmap);
 	Bool is_offscreen = exaPixmapIsOffscreen(pPixmap);
 	ExaMigrationRec pixmaps[1];
 
@@ -197,7 +201,8 @@ exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
 	pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
 	pPixmap->devKind = pExaPixmap->sys_pitch;
 	pExaPixmap->offscreen = FALSE;
-    }
+    } else
+	pPixmap->devKind = pExaPixmap->fb_pitch;
 }
 
 /* Move back results of software rendering on system memory copy of mixed driver
commit 647b79f87a9891225678dc6fc2fbda3bdef8fa9d
Author: Maarten Maathuis <madman2003 at gmail.com>
Date:   Wed Nov 18 21:23:08 2009 +0100

    exa/mixed: avoid copying back pixmap data when no migration took place
    
    - When the driver handles the prepare access no copying is needed.
    - Delayed pixmap creation should be fine, because it's handled by the
      first prepare access, but the exaPixmapIsOffscreen check in finish access
      will return FALSE without a driver pixmap.
    
    Signed-off-by: Maarten Maathuis <madman2003 at gmail.com>
    Acked-by: Michel Dänzer <michel at daenzer.net>

diff --git a/exa/exa_migration_mixed.c b/exa/exa_migration_mixed.c
index 6065d75..ea6f878 100644
--- a/exa/exa_migration_mixed.c
+++ b/exa/exa_migration_mixed.c
@@ -210,7 +210,8 @@ void exaFinishAccess_mixed(PixmapPtr pPixmap, int index)
 {
     ExaPixmapPriv(pPixmap);
 
-    if (pExaPixmap->pDamage && exaPixmapIsOffscreen(pPixmap)) {
+    if (pExaPixmap->pDamage && !pExaPixmap->offscreen &&
+	    exaPixmapIsOffscreen(pPixmap)){
 	DamageRegionProcessPending(&pPixmap->drawable);
 
 	if (index == EXA_PREPARE_DEST || index == EXA_PREPARE_AUX_DEST) {


More information about the xorg-commit mailing list