diff options
author | Keith Packard <keithp@keithp.com> | 2014-04-25 13:23:44 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2014-06-15 22:49:39 +0100 |
commit | 2878cc9bb943cb574f92758014d07bbd20036776 (patch) | |
tree | c36d9aa6a9e0102faa3a632a4bb8ce0a05fac768 | |
parent | 57f58d3fa507ce5697afc3b5a8c21edf7e6802c9 (diff) |
uxa: use glamor_copy_window when running glamor
Don't use the uxa code in this case; it's slower.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | src/uxa/uxa-accel.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/uxa/uxa-accel.c b/src/uxa/uxa-accel.c index 8bfc193f..6529bfe5 100644 --- a/src/uxa/uxa-accel.c +++ b/src/uxa/uxa-accel.c @@ -1131,9 +1131,21 @@ const GCOps uxa_ops = { void uxa_copy_window(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { + ScreenPtr screen = pWin->drawable.pScreen; + uxa_screen_t *uxa_screen = uxa_get_screen(screen); RegionRec rgnDst; int dx, dy; - PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin); + PixmapPtr pPixmap; + + if (uxa_screen->info->flags & UXA_USE_GLAMOR) { + if (uxa_prepare_access(&pWin->drawable, UXA_GLAMOR_ACCESS_RW)) { + glamor_copy_window(pWin, ptOldOrg, prgnSrc); + uxa_finish_access(&pWin->drawable, UXA_GLAMOR_ACCESS_RW); + return; + } + } + + pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin); dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; |