Revert "exa: a few small pitch related changes"
This reverts commit 99d88ef69d
.
- Some pixmaps under classic have a sys_pitch which is 0, no idea why. This is
causing rendering corruption.
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
98c8b75225
commit
8ea415d417
11
exa/exa.c
11
exa/exa.c
|
@ -323,17 +323,10 @@ ExaDoPrepareAccess(PixmapPtr pPixmap, int index)
|
||||||
|
|
||||||
has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
|
has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
|
||||||
|
|
||||||
if (has_gpu_copy) {
|
if (has_gpu_copy && pExaPixmap->fb_ptr)
|
||||||
/* This can be NULL, but the driver prepareAccess call should
|
|
||||||
* take care of that. */
|
|
||||||
pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
|
pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
|
||||||
pPixmap->devKind = pExaPixmap->fb_pitch;
|
else
|
||||||
} else {
|
|
||||||
/* For mixed pixmaps this can be NULL, but that will be fixed
|
|
||||||
* later in exaPrepareAccessReg_mixed(). */
|
|
||||||
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
|
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
|
||||||
pPixmap->devKind = pExaPixmap->sys_pitch;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Store so we can handle repeated / nested calls. */
|
/* Store so we can handle repeated / nested calls. */
|
||||||
pExaScr->access[index].pixmap = pPixmap;
|
pExaScr->access[index].pixmap = pPixmap;
|
||||||
|
|
|
@ -101,6 +101,7 @@ exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
|
||||||
if (pExaPixmap->pDamage && exaPixmapHasGpuCopy(pPixmap)) {
|
if (pExaPixmap->pDamage && exaPixmapHasGpuCopy(pPixmap)) {
|
||||||
ExaScreenPriv(pPixmap->drawable.pScreen);
|
ExaScreenPriv(pPixmap->drawable.pScreen);
|
||||||
|
|
||||||
|
pPixmap->devKind = pExaPixmap->fb_pitch;
|
||||||
exaCopyDirtyToFb(pixmaps + i);
|
exaCopyDirtyToFb(pixmaps + i);
|
||||||
|
|
||||||
if (pExaScr->deferred_mixed_pixmap == pPixmap)
|
if (pExaScr->deferred_mixed_pixmap == pPixmap)
|
||||||
|
@ -108,10 +109,6 @@ exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
|
||||||
}
|
}
|
||||||
|
|
||||||
pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
|
pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
|
||||||
if (pExaPixmap->use_gpu_copy)
|
|
||||||
pPixmap->devKind = pExaPixmap->fb_pitch;
|
|
||||||
else
|
|
||||||
pPixmap->devKind = pExaPixmap->sys_pitch;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,14 +183,17 @@ exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
|
||||||
pixmaps[0].as_src = TRUE;
|
pixmaps[0].as_src = TRUE;
|
||||||
pixmaps[0].pReg = NULL;
|
pixmaps[0].pReg = NULL;
|
||||||
}
|
}
|
||||||
|
pPixmap->devKind = pExaPixmap->fb_pitch;
|
||||||
exaCopyDirtyToSys(pixmaps);
|
exaCopyDirtyToSys(pixmaps);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (as_dst)
|
if (as_dst)
|
||||||
exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width,
|
exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width,
|
||||||
pPixmap->drawable.height);
|
pPixmap->drawable.height);
|
||||||
} else if (has_gpu_copy)
|
} else if (has_gpu_copy) {
|
||||||
|
pPixmap->devKind = pExaPixmap->fb_pitch;
|
||||||
exaCopyDirtyToSys(pixmaps);
|
exaCopyDirtyToSys(pixmaps);
|
||||||
|
}
|
||||||
|
|
||||||
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
|
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
|
||||||
pPixmap->devKind = pExaPixmap->sys_pitch;
|
pPixmap->devKind = pExaPixmap->sys_pitch;
|
||||||
|
@ -222,6 +222,7 @@ void exaFinishAccess_mixed(PixmapPtr pPixmap, int index)
|
||||||
pExaScr->deferred_mixed_pixmap != pPixmap)
|
pExaScr->deferred_mixed_pixmap != pPixmap)
|
||||||
exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap);
|
exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap);
|
||||||
pExaScr->deferred_mixed_pixmap = pPixmap;
|
pExaScr->deferred_mixed_pixmap = pPixmap;
|
||||||
|
pPixmap->devKind = pExaPixmap->fb_pitch;
|
||||||
} else
|
} else
|
||||||
exaMoveInPixmap_mixed(pPixmap);
|
exaMoveInPixmap_mixed(pPixmap);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user