summaryrefslogtreecommitdiff
path: root/exa/exa.c
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-09-26 02:04:48 +0200
committerMichel Dänzer <daenzer@vmware.com>2009-09-26 02:04:48 +0200
commit0369eeeb6bf8a808fa2df503fc8b8df81e6e07b8 (patch)
treeae4cce47678bbe8ebce5a043f99eff18abb866a8 /exa/exa.c
parent1818cbd70fc1f2e1487b4c678e67e28f1265c0ef (diff)
EXA: Try to minimize UploadToScreen calls for mixed pixmaps.
If there are several software fallbacks affecting the system memory copy of the same pixmap, only copy the results back to the driver pixmap when it's used for acceleration again, or in the BlockHandler, whichever happens first.
Diffstat (limited to 'exa/exa.c')
-rw-r--r--exa/exa.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/exa/exa.c b/exa/exa.c
index e264d440c..46e91820b 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -774,10 +774,18 @@ ExaBlockHandler(int screenNum, pointer blockData, pointer pTimeout,
ScreenPtr pScreen = screenInfo.screens[screenNum];
ExaScreenPriv(pScreen);
+ /* Move any deferred results from a software fallback to the driver pixmap */
+ if (pExaScr->deferred_mixed_pixmap)
+ exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap);
+
unwrap(pExaScr, pScreen, BlockHandler);
(*pScreen->BlockHandler) (screenNum, blockData, pTimeout, pReadmask);
wrap(pExaScr, pScreen, BlockHandler, ExaBlockHandler);
+ /* The rest only applies to classic EXA */
+ if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS)
+ return;
+
/* Try and keep the offscreen memory area tidy every now and then (at most
* once per second) when the server has been idle for at least 100ms.
*/
@@ -991,10 +999,12 @@ exaDriverInit (ScreenPtr pScreen,
* Replace various fb screen functions
*/
if ((pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) &&
- !(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) {
+ (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS) ||
+ (pExaScr->info->flags & EXA_MIXED_PIXMAPS)))
wrap(pExaScr, pScreen, BlockHandler, ExaBlockHandler);
+ if ((pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) &&
+ !(pExaScr->info->flags & EXA_HANDLES_PIXMAPS))
wrap(pExaScr, pScreen, WakeupHandler, ExaWakeupHandler);
- }
wrap(pExaScr, pScreen, CreateGC, exaCreateGC);
wrap(pExaScr, pScreen, CloseScreen, exaCloseScreen);
wrap(pExaScr, pScreen, GetImage, exaGetImage);