summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2011-01-30 14:06:16 +0100
committerKeith Packard <keithp@keithp.com>2011-02-02 14:54:25 -0800
commit541b25038a5de74411a094570b407c5ae018c2ba (patch)
tree4764bcabc817e8c50607dd768cc38d3120d3e168
parentaf87f6367ef733d1a4f3cfca4eeb92bfd84c2b6f (diff)
exa/mixed: Exclude frontbuffer from deferred pixmap handling.
- Apps like xterm can trigger a lot of fallback rendering. - This can lead to (annoyingly) high latencies, because you have to wait for the block handler. - You need a driver that doesn't directly access the front buffer to trigger this (NV50+ nouveau for example). - Repeatingly doing dmesg on an xterm with a bitmap font will reveal that you never see part of the text. - I have recieved at least one complaint in the past of slow terminal performance, which was related to core font rendering. - This does sacrifice some throughput, roughly 33% slower. Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--exa/exa_migration_mixed.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/exa/exa_migration_mixed.c b/exa/exa_migration_mixed.c
index fb4715135..4f49905d3 100644
--- a/exa/exa_migration_mixed.c
+++ b/exa/exa_migration_mixed.c
@@ -138,6 +138,7 @@ void
exaDamageReport_mixed(DamagePtr pDamage, RegionPtr pRegion, void *closure)
{
PixmapPtr pPixmap = closure;
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
ExaPixmapPriv(pPixmap);
/* Move back results of software rendering on system memory copy of mixed driver
@@ -149,10 +150,18 @@ exaDamageReport_mixed(DamagePtr pDamage, RegionPtr pRegion, void *closure)
if (!pExaPixmap->use_gpu_copy && exaPixmapHasGpuCopy(pPixmap)) {
ExaScreenPriv(pPixmap->drawable.pScreen);
- if (pExaScr->deferred_mixed_pixmap &&
- pExaScr->deferred_mixed_pixmap != pPixmap)
- exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap);
- pExaScr->deferred_mixed_pixmap = pPixmap;
+ /* Front buffer: Don't wait for the block handler to copy back the data.
+ * This avoids annoying latency if you encounter a lot of software rendering.
+ */
+ if (pPixmap == pScreen->GetScreenPixmap(pScreen))
+ exaMoveInPixmap_mixed(pPixmap);
+ else {
+ if (pExaScr->deferred_mixed_pixmap &&
+ pExaScr->deferred_mixed_pixmap != pPixmap)
+ exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap);
+
+ pExaScr->deferred_mixed_pixmap = pPixmap;
+ }
}
}