diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-12-29 09:34:43 +0100 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-12-29 11:02:56 -0800 |
commit | aa9ce8ab343d51a67924757c5a43c9572248bb24 (patch) | |
tree | c64097d38c233c36565ad1591088b9017a66593b /exa/exa_unaccel.c | |
parent | 39cc110caa1f6481a7213ae39f82669333ec1645 (diff) |
EXA: Use relevant source region to minimize migration on CopyWindow fallbacks.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Acked-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'exa/exa_unaccel.c')
-rw-r--r-- | exa/exa_unaccel.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c index 0dbcd53b2..f077fc893 100644 --- a/exa/exa_unaccel.c +++ b/exa/exa_unaccel.c @@ -313,8 +313,18 @@ ExaCheckCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) EXA_PRE_FALLBACK(pScreen); EXA_FALLBACK(("from %p\n", pWin)); - /* being both src and dest, src is safest. */ - exaPrepareAccess(pDrawable, EXA_PREPARE_SRC); + /* Only need the source bits, the destination region will be overwritten */ + if (pExaScr->prepare_access_reg) { + PixmapPtr pPixmap = pScreen->GetWindowPixmap(pWin); + int xoff, yoff; + + exaGetDrawableDeltas(&pWin->drawable, pPixmap, &xoff, &yoff); + REGION_TRANSLATE(pScreen, prgnSrc, xoff, yoff); + pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_SRC, prgnSrc); + REGION_TRANSLATE(pScreen, prgnSrc, -xoff, -yoff); + } else + exaPrepareAccess(pDrawable, EXA_PREPARE_SRC); + swap(pExaScr, pScreen, CopyWindow); pScreen->CopyWindow (pWin, ptOldOrg, prgnSrc); swap(pExaScr, pScreen, CopyWindow); |