diff options
author | Maarten Maathuis <madman2003@gmail.com> | 2009-12-03 19:28:13 +0100 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-12-03 16:45:08 -0800 |
commit | 0f4ef7123d3e6e09e04dc55e8edb47aecf017648 (patch) | |
tree | ea93cd577486a4f6e5f949a05f38c0e85367b439 /exa | |
parent | 8ea415d417b3ef6b8a288d10da76ff4bc334e08b (diff) |
exa/mixed: setting devKind before exaCopyDirty* is not needed
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'exa')
-rw-r--r-- | exa/exa_migration_mixed.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/exa/exa_migration_mixed.c b/exa/exa_migration_mixed.c index a7fdf631a..9587ea23f 100644 --- a/exa/exa_migration_mixed.c +++ b/exa/exa_migration_mixed.c @@ -101,6 +101,14 @@ exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel) if (pExaPixmap->pDamage && exaPixmapHasGpuCopy(pPixmap)) { ExaScreenPriv(pPixmap->drawable.pScreen); + /* This pitch is needed for proper acceleration. For some reason + * there are pixmaps without pDamage and a bad fb_pitch value. + * So setting devKind when only exaPixmapHasGpuCopy() is true + * causes corruption. Pixmaps without pDamage are not migrated + * and should have a valid devKind at all times, so that's why this + * isn't causing problems. Pixmaps have their gpu pitch set the + * first time in the MPH call from exaCreateDriverPixmap_mixed(). + */ pPixmap->devKind = pExaPixmap->fb_pitch; exaCopyDirtyToFb(pixmaps + i); @@ -183,17 +191,14 @@ exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg) pixmaps[0].as_src = TRUE; pixmaps[0].pReg = NULL; } - pPixmap->devKind = pExaPixmap->fb_pitch; exaCopyDirtyToSys(pixmaps); } if (as_dst) exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width, pPixmap->drawable.height); - } else if (has_gpu_copy) { - pPixmap->devKind = pExaPixmap->fb_pitch; + } else if (has_gpu_copy) exaCopyDirtyToSys(pixmaps); - } pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; pPixmap->devKind = pExaPixmap->sys_pitch; |