summaryrefslogtreecommitdiff
path: root/exa
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2006-04-28 03:26:30 +0000
committerEric Anholt <anholt@freebsd.org>2006-04-28 03:26:30 +0000
commit005529a1c9c9e78f06565dff081f03b74988081e (patch)
tree6885fa99834d3ef4c839bea08520d9f4ccf27979 /exa
parent8738bc295bba229e36d064713e0c28aa8720c494 (diff)
Correct some bugs causing performance issues in the "Smart" scheme.
Diffstat (limited to 'exa')
-rw-r--r--exa/exa_migration.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/exa/exa_migration.c b/exa/exa_migration.c
index 29662b5cb..57d651f80 100644
--- a/exa/exa_migration.c
+++ b/exa/exa_migration.c
@@ -72,7 +72,8 @@ exaPixmapIsDirty (PixmapPtr pPix)
/**
* Returns TRUE if the pixmap is either pinned in FB, or has a sufficient score
- * to be considered "should be in framebuffer".
+ * to be considered "should be in framebuffer". That's just anything that has
+ * had more acceleration than fallbacks, or has no score yet.
*
* Only valid if using a migration scheme that tracks score.
*/
@@ -84,7 +85,7 @@ exaPixmapShouldBeInFB (PixmapPtr pPix)
if (exaPixmapIsPinned (pPix))
return TRUE;
- return pExaPixmap->score >= EXA_PIXMAP_SCORE_INIT;
+ return pExaPixmap->score >= 0;
}
/**
@@ -486,7 +487,11 @@ exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
if (pixmaps[i].as_dst && !exaPixmapShouldBeInFB (pixmaps[i].pPix) &&
!exaPixmapIsDirty (pixmaps[i].pPix))
{
- can_accel = FALSE;
+ for (i = 0; i < npixmaps; i++) {
+ if (!exaPixmapIsDirty (pixmaps[i].pPix))
+ exaMoveOutPixmap (pixmaps[i].pPix);
+ }
+ return;
}
}