xserver: Branch 'master' - 2 commits
Michel Daenzer
daenzer at kemper.freedesktop.org
Thu Jul 31 01:59:39 PDT 2008
exa/exa_accel.c | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
New commits:
commit 64ebeeb5265a4c425b9397fdc86a6d81521a856e
Author: Michel Dänzer <michel at tungstengraphics.com>
Date: Thu Jul 31 10:58:52 2008 +0200
EXA: Fix exponential growth logic for GXcopy tiled fills.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=16908 .
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index f7da911..277ab1e 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -1311,10 +1311,10 @@ exaFillRegionTiled (DrawablePtr pDrawable,
planemask)) {
for (i = 0; i < nbox; i++)
{
- int width = min(pBox[i].x2 - pBox[i].x1, tileWidth);
+ int dstX = pBox[i].x1 + tileWidth;
+ int dstY = pBox[i].y1 + tileHeight;
+ int width = min(pBox[i].x2 - dstX, tileWidth);
int height = min(pBox[i].y2 - pBox[i].y1, tileHeight);
- int dstX = pBox[i].x1 + width;
- int dstY = pBox[i].y1 + height;
while (dstX < pBox[i].x2) {
(*pExaScr->info->Copy) (pPixmap, pBox[i].x1, pBox[i].y1,
@@ -1324,6 +1324,7 @@ exaFillRegionTiled (DrawablePtr pDrawable,
}
width = pBox[i].x2 - pBox[i].x1;
+ height = min(pBox[i].y2 - dstY, tileHeight);
while (dstY < pBox[i].y2) {
(*pExaScr->info->Copy) (pPixmap, pBox[i].x1, pBox[i].y1,
commit 8405c25d9ddbfddb6b155a436f07ccad689e53bd
Author: Michel Dänzer <michel at tungstengraphics.com>
Date: Thu Jul 31 10:55:44 2008 +0200
EXA: Simplify exaFillRegionTiled() control flow.
Also only call REGION_TRANSLATE() when necessary.
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index cf15709..f7da911 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -1234,14 +1234,11 @@ exaFillRegionTiled (DrawablePtr pDrawable,
pixmaps[1].pPix = pTile;
pixmaps[1].pReg = NULL;
- exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
- REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
-
pExaPixmap = ExaGetPixmapPriv (pPixmap);
if (pExaPixmap->accel_blocked || pTileExaPixmap->accel_blocked)
{
- goto out;
+ return FALSE;
} else {
exaDoMigration (pixmaps, 2, TRUE);
}
@@ -1249,10 +1246,13 @@ exaFillRegionTiled (DrawablePtr pDrawable,
pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
if (!pPixmap || !exaPixmapIsOffscreen(pTile))
- goto out;
+ return FALSE;
if ((*pExaScr->info->PrepareCopy) (pTile, pPixmap, 1, 1, alu, planemask))
{
+ if (xoff || yoff)
+ REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
+
for (i = 0; i < nbox; i++)
{
int height = pBox[i].y2 - pBox[i].y1;
@@ -1297,8 +1297,6 @@ exaFillRegionTiled (DrawablePtr pDrawable,
}
(*pExaScr->info->DoneCopy) (pPixmap);
- exaMarkSync(pDrawable->pScreen);
-
/* With GXcopy, we only need to do the basic algorithm up to the tile
* size; then, we can just keep doubling the destination in each
* direction until it fills the box. This way, the number of copy
@@ -1336,15 +1334,15 @@ exaFillRegionTiled (DrawablePtr pDrawable,
}
(*pExaScr->info->DoneCopy) (pPixmap);
-
- ret = TRUE;
}
- }
-out:
- REGION_TRANSLATE(pScreen, pRegion, -xoff, -yoff);
+ exaMarkSync(pDrawable->pScreen);
- return ret;
+ if (xoff || yoff)
+ REGION_TRANSLATE(pScreen, pRegion, -xoff, -yoff);
+ }
+
+ return TRUE;
}
More information about the xorg-commit
mailing list