EXA: Remove DrawableDirty.
Convert the remaining callers to PixmapDirty.
This commit is contained in:
parent
b1b6674a91
commit
a261e13250
23
exa/exa.c
23
exa/exa.c
|
@ -172,29 +172,6 @@ exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2)
|
||||||
REGION_UNINIT(pScreen, ®ion);
|
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
|
static Bool
|
||||||
exaDestroyPixmap (PixmapPtr pPixmap)
|
exaDestroyPixmap (PixmapPtr pPixmap)
|
||||||
{
|
{
|
||||||
|
|
|
@ -351,9 +351,6 @@ void
|
||||||
exaGetDrawableDeltas (DrawablePtr pDrawable, PixmapPtr pPixmap,
|
exaGetDrawableDeltas (DrawablePtr pDrawable, PixmapPtr pPixmap,
|
||||||
int *xp, int *yp);
|
int *xp, int *yp);
|
||||||
|
|
||||||
void
|
|
||||||
exaDrawableDirty(DrawablePtr pDrawable, int x1, int y1, int x2, int y2);
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
exaDrawableIsOffscreen (DrawablePtr pDrawable);
|
exaDrawableIsOffscreen (DrawablePtr pDrawable);
|
||||||
|
|
||||||
|
|
|
@ -764,6 +764,7 @@ exaRasterizeTrapezoid (PicturePtr pPicture, xTrapezoid *trap,
|
||||||
{
|
{
|
||||||
DrawablePtr pDraw = pPicture->pDrawable;
|
DrawablePtr pDraw = pPicture->pDrawable;
|
||||||
ExaMigrationRec pixmaps[1];
|
ExaMigrationRec pixmaps[1];
|
||||||
|
int xoff, yoff;
|
||||||
|
|
||||||
pixmaps[0].as_dst = TRUE;
|
pixmaps[0].as_dst = TRUE;
|
||||||
pixmaps[0].as_src = TRUE;
|
pixmaps[0].as_src = TRUE;
|
||||||
|
@ -772,8 +773,10 @@ exaRasterizeTrapezoid (PicturePtr pPicture, xTrapezoid *trap,
|
||||||
|
|
||||||
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
||||||
fbRasterizeTrapezoid(pPicture, trap, x_off, y_off);
|
fbRasterizeTrapezoid(pPicture, trap, x_off, y_off);
|
||||||
exaDrawableDirty(pDraw, pDraw->x, pDraw->y,
|
exaGetDrawableDeltas(pDraw, pixmaps[0].pPix, &xoff, &yoff);
|
||||||
pDraw->x + pDraw->width, pDraw->y + pDraw->height);
|
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);
|
exaFinishAccess(pDraw, EXA_PREPARE_DEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -787,6 +790,7 @@ exaAddTriangles (PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntri,
|
||||||
{
|
{
|
||||||
DrawablePtr pDraw = pPicture->pDrawable;
|
DrawablePtr pDraw = pPicture->pDrawable;
|
||||||
ExaMigrationRec pixmaps[1];
|
ExaMigrationRec pixmaps[1];
|
||||||
|
int xoff, yoff;
|
||||||
|
|
||||||
pixmaps[0].as_dst = TRUE;
|
pixmaps[0].as_dst = TRUE;
|
||||||
pixmaps[0].as_src = 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);
|
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
||||||
fbAddTriangles(pPicture, x_off, y_off, ntri, tris);
|
fbAddTriangles(pPicture, x_off, y_off, ntri, tris);
|
||||||
exaDrawableDirty(pDraw, pDraw->x, pDraw->y,
|
exaGetDrawableDeltas(pDraw, pixmaps[0].pPix, &xoff, &yoff);
|
||||||
pDraw->x + pDraw->width, pDraw->y + pDraw->height);
|
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);
|
exaFinishAccess(pDraw, EXA_PREPARE_DEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue