[PATCH 3/3] exa/mixed: Exclude frontbuffer from deferred pixmap handling.
Maarten Maathuis
madman2003 at gmail.com
Wed Jan 19 01:09:55 PST 2011
This is it, 10 ms a short time and even with this value large amounts
of text are still not shown fluently (the impression that some pieces
are never drawn). This is on top of the previous 3 patches.
diff --git a/exa/exa_migration_mixed.c b/exa/exa_migration_mixed.c
index 4f49905..c0c730d 100644
--- a/exa/exa_migration_mixed.c
+++ b/exa/exa_migration_mixed.c
@@ -150,12 +150,26 @@ exaDamageReport_mixed(DamagePtr pDamage,
RegionPtr pRegion, void *closure)
if (!pExaPixmap->use_gpu_copy && exaPixmapHasGpuCopy(pPixmap)) {
ExaScreenPriv(pPixmap->drawable.pScreen);
- /* 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.
+ /* Front buffer: Don't wait for the block handler to copy back the
data, unless
+ * it has been moved back in the last 10 ms. This avoid annoying latency when
+ * troughput is low, but keeps troughput acceptable at higher levels.
*/
- if (pPixmap == pScreen->GetScreenPixmap(pScreen))
- exaMoveInPixmap_mixed(pPixmap);
- else {
+ if (pPixmap == pScreen->GetScreenPixmap(pScreen)) {
+ CARD32 now = GetTimeInMillis();
+ if ((now - pExaScr->last_time_front_mixed_pixmap) > 10) {
+ pExaScr->last_time_front_mixed_pixmap = now;
+ exaMoveInPixmap_mixed(pPixmap);
+
+ if (pExaScr->deferred_mixed_pixmap == pPixmap)
+ pExaScr->deferred_mixed_pixmap = NULL;
+ } else {
+ if (pExaScr->deferred_mixed_pixmap &&
+ pExaScr->deferred_mixed_pixmap != pPixmap)
+ exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap);
+
+ pExaScr->deferred_mixed_pixmap = pPixmap;
+ }
+ } else {
if (pExaScr->deferred_mixed_pixmap &&
pExaScr->deferred_mixed_pixmap != pPixmap)
exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap);
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index e5d90d4..cb58a02 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -185,6 +185,7 @@ typedef struct {
CARD32 lastDefragment;
CARD32 nextDefragment;
PixmapPtr deferred_mixed_pixmap;
+ CARD32 last_time_front_mixed_pixmap;
/* Reference counting for accessed pixmaps */
struct {
More information about the xorg-devel
mailing list