Commit a261e132 authored by Michel Dänzer's avatar Michel Dänzer
Browse files

EXA: Remove DrawableDirty.

Convert the remaining callers to PixmapDirty.
parent b1b6674a
......@@ -172,29 +172,6 @@ exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2)
REGION_UNINIT(pScreen, &region);
}
/**
* 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)
{
......
......@@ -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);
......
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment