diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-04-29 23:49:35 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-04-29 23:49:35 +0200 |
commit | a261e1325057974d58440812b93c00c0caa4423a (patch) | |
tree | ae3c5c6a43ffb8d6edcd77430df7348e04e9e8bb /exa | |
parent | b1b6674a919943a8ac37e54d02e8d0d23a642b1d (diff) |
EXA: Remove DrawableDirty.
Convert the remaining callers to PixmapDirty.
Diffstat (limited to 'exa')
-rw-r--r-- | exa/exa.c | 23 | ||||
-rw-r--r-- | exa/exa_priv.h | 3 | ||||
-rw-r--r-- | exa/exa_render.c | 14 |
3 files changed, 10 insertions, 30 deletions
@@ -172,29 +172,6 @@ exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2) REGION_UNINIT(pScreen, ®ion); } -/** - * exaDrawableDirty() marks a pixmap backing a drawable as dirty, allowing for - * optimizations in pixmap migration when no changes have occurred. - */ -void -exaDrawableDirty (DrawablePtr pDrawable, int x1, int y1, int x2, int y2) -{ - PixmapPtr pPix = exaGetDrawablePixmap(pDrawable); - int xoff, yoff; - - x1 = max(x1, pDrawable->x); - y1 = max(y1, pDrawable->y); - x2 = min(x2, pDrawable->x + pDrawable->width); - y2 = min(y2, pDrawable->y + pDrawable->height); - - if (x1 >= x2 || y1 >= y2) - return; - - exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff); - - exaPixmapDirty(pPix, x1 + xoff, y1 + yoff, x2 + xoff, y2 + yoff); -} - static Bool exaDestroyPixmap (PixmapPtr pPixmap) { diff --git a/exa/exa_priv.h b/exa/exa_priv.h index b97608214..ece589851 100644 --- a/exa/exa_priv.h +++ b/exa/exa_priv.h @@ -351,9 +351,6 @@ void exaGetDrawableDeltas (DrawablePtr pDrawable, PixmapPtr pPixmap, int *xp, int *yp); -void -exaDrawableDirty(DrawablePtr pDrawable, int x1, int y1, int x2, int y2); - Bool exaDrawableIsOffscreen (DrawablePtr pDrawable); diff --git a/exa/exa_render.c b/exa/exa_render.c index 06881e39f..5e7c67feb 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -764,6 +764,7 @@ exaRasterizeTrapezoid (PicturePtr pPicture, xTrapezoid *trap, { DrawablePtr pDraw = pPicture->pDrawable; ExaMigrationRec pixmaps[1]; + int xoff, yoff; pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = TRUE; @@ -772,8 +773,10 @@ exaRasterizeTrapezoid (PicturePtr pPicture, xTrapezoid *trap, exaPrepareAccess(pDraw, EXA_PREPARE_DEST); fbRasterizeTrapezoid(pPicture, trap, x_off, y_off); - exaDrawableDirty(pDraw, pDraw->x, pDraw->y, - pDraw->x + pDraw->width, pDraw->y + pDraw->height); + exaGetDrawableDeltas(pDraw, pixmaps[0].pPix, &xoff, &yoff); + exaPixmapDirty(pixmaps[0].pPix, pDraw->x + xoff, pDraw->y + yoff, + pDraw->x + xoff + pDraw->width, + pDraw->y + yoff + pDraw->height); exaFinishAccess(pDraw, EXA_PREPARE_DEST); } @@ -787,6 +790,7 @@ exaAddTriangles (PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntri, { DrawablePtr pDraw = pPicture->pDrawable; ExaMigrationRec pixmaps[1]; + int xoff, yoff; pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = TRUE; @@ -795,8 +799,10 @@ exaAddTriangles (PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntri, exaPrepareAccess(pDraw, EXA_PREPARE_DEST); fbAddTriangles(pPicture, x_off, y_off, ntri, tris); - exaDrawableDirty(pDraw, pDraw->x, pDraw->y, - pDraw->x + pDraw->width, pDraw->y + pDraw->height); + exaGetDrawableDeltas(pDraw, pixmaps[0].pPix, &xoff, &yoff); + exaPixmapDirty(pixmaps[0].pPix, pDraw->x + xoff, pDraw->y + yoff, + pDraw->x + xoff + pDraw->width, + pDraw->y + yoff + pDraw->height); exaFinishAccess(pDraw, EXA_PREPARE_DEST); } |