summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-04-29 23:49:09 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2007-04-29 23:49:09 +0200
commit584697a2231ac782f362a925e1489c15483a8791 (patch)
tree6a6b26e4230bf6bcb74a743c11f5bfe1ceaff27b
parent982d7c2c0b948ba04c8eefa475d660981e6ed9f9 (diff)
EXA: SolidBoxClipped improvements.
* Centralize handling of fallbacks and damage tracking. * Always migrate for fallbacks.
-rw-r--r--exa/exa_accel.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 800c4f0fb..4aa2d63d8 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -826,20 +826,19 @@ exaSolidBoxClipped (DrawablePtr pDrawable,
pPixmap->drawable.width > pExaScr->info->maxX ||
pPixmap->drawable.height > pExaScr->info->maxY)
{
- exaDoMigration (pixmaps, 1, FALSE);
- goto fallback;
+ fallback = TRUE;
} else {
exaDoMigration (pixmaps, 1, TRUE);
}
- pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
+ exaGetDrawableDeltas (pDrawable, pPixmap, &xoff, &yoff);
- if (!pPixmap ||
+ if (fallback || !exaPixmapIsOffscreen(pPixmap) ||
!(*pExaScr->info->PrepareSolid) (pPixmap, GXcopy, pm, fg))
{
-fallback:
EXA_FALLBACK(("to %p (%c)\n", pDrawable,
exaDrawableLocation(pDrawable)));
+ exaDoMigration (pixmaps, 1, FALSE);
fallback = TRUE;
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
fg = fbReplicatePixel (fg, pDrawable->bitsPerPixel);
@@ -878,10 +877,10 @@ fallback:
(*pExaScr->info->Solid) (pPixmap,
partX1 + xoff, partY1 + yoff,
partX2 + xoff, partY2 + yoff);
- exaPixmapDirty (pPixmap, partX1 + xoff, partY1 + yoff,
- partX2 + xoff, partY2 + yoff);
- } else
- exaDrawableDirty (pDrawable, partX1, partY1, partX2, partY2);
+ }
+
+ exaPixmapDirty (pPixmap, partX1 + xoff, partY1 + yoff, partX2 + xoff,
+ partY2 + yoff);
}
if (fallback)