diff --git a/exa/exa.c b/exa/exa.c index 3d77800ff..c5b5a666a 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -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); }