summaryrefslogtreecommitdiff
path: root/exa
diff options
context:
space:
mode:
Diffstat (limited to 'exa')
-rw-r--r--exa/exa.c6
-rw-r--r--exa/exa_accel.c78
-rw-r--r--exa/exa_classic.c8
-rw-r--r--exa/exa_migration_classic.c60
-rw-r--r--exa/exa_mixed.c4
-rw-r--r--exa/exa_render.c48
-rw-r--r--exa/exa_unaccel.c56
7 files changed, 130 insertions, 130 deletions
diff --git a/exa/exa.c b/exa/exa.c
index 46a850f8f..4e1ffd699 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -161,10 +161,10 @@ exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2)
if (box.x1 >= box.x2 || box.y1 >= box.y2)
return;
- REGION_INIT(pScreen, &region, &box, 1);
+ RegionInit(&region, &box, 1);
DamageRegionAppend(&pPix->drawable, &region);
DamageRegionProcessPending(&pPix->drawable);
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
}
static int
@@ -658,7 +658,7 @@ exaBitmapToRegion(PixmapPtr pPix)
exaPrepareAccess(&pPix->drawable, EXA_PREPARE_SRC);
swap(pExaScr, pScreen, BitmapToRegion);
- ret = pScreen->BitmapToRegion(pPix);
+ ret = (*pScreen->BitmapToRegion)(pPix);
swap(pExaScr, pScreen, BitmapToRegion);
exaFinishAccess(&pPix->drawable, EXA_PREPARE_SRC);
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index cf48ecd0d..6c677c7a1 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -81,7 +81,7 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
return;
}
- pextent = REGION_EXTENTS(pGC->pScreen, pClip);
+ pextent = RegionExtents(pClip);
extentX1 = pextent->x1;
extentY1 = pextent->y1;
extentX2 = pextent->x2;
@@ -106,7 +106,7 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
if (fullX1 >= fullX2)
continue;
- nbox = REGION_NUM_RECTS (pClip);
+ nbox = RegionNumRects (pClip);
if (nbox == 1)
{
(*pExaScr->info->Solid) (pPixmap,
@@ -115,7 +115,7 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
}
else
{
- pbox = REGION_RECTS(pClip);
+ pbox = RegionRects(pClip);
while(nbox--)
{
if (pbox->y1 <= fullY1 && fullY1 < pbox->y2)
@@ -192,8 +192,8 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
y += pDrawable->y;
pClip = fbGetCompositeClip(pGC);
- for (nbox = REGION_NUM_RECTS(pClip),
- pbox = REGION_RECTS(pClip);
+ for (nbox = RegionNumRects(pClip),
+ pbox = RegionRects(pClip);
nbox--;
pbox++)
{
@@ -416,15 +416,15 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable,
else
ordering = CT_UNSORTED;
- srcregion = RECTS_TO_REGION(pScreen, nbox, rects, ordering);
+ srcregion = RegionFromRects(nbox, rects, ordering);
free(rects);
if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask,
pGC->fillStyle, pGC->alu,
pGC->clientClipType)) {
- dstregion = REGION_CREATE(pScreen, NullBox, 0);
- REGION_COPY(pScreen, dstregion, srcregion);
- REGION_TRANSLATE(pScreen, dstregion, dst_off_x - dx - src_off_x,
+ dstregion = RegionCreate(NullBox, 0);
+ RegionCopy(dstregion, srcregion);
+ RegionTranslate(dstregion, dst_off_x - dx - src_off_x,
dst_off_y - dy - src_off_y);
}
}
@@ -551,12 +551,12 @@ fallback:
out:
if (dstregion) {
- REGION_UNINIT(pScreen, dstregion);
- REGION_DESTROY(pScreen, dstregion);
+ RegionUninit(dstregion);
+ RegionDestroy(dstregion);
}
if (srcregion) {
- REGION_UNINIT(pScreen, srcregion);
- REGION_DESTROY(pScreen, srcregion);
+ RegionUninit(srcregion);
+ RegionDestroy(srcregion);
}
return ret;
@@ -788,13 +788,13 @@ exaPolyFillRect(DrawablePtr pDrawable,
int xoff, yoff;
int xorg, yorg;
int n;
- RegionPtr pReg = RECTS_TO_REGION(pScreen, nrect, prect, CT_UNSORTED);
+ RegionPtr pReg = RegionFromRects(nrect, prect, CT_UNSORTED);
/* Compute intersection of rects and clip region */
- REGION_TRANSLATE(pScreen, pReg, pDrawable->x, pDrawable->y);
- REGION_INTERSECT(pScreen, pReg, pClip, pReg);
+ RegionTranslate(pReg, pDrawable->x, pDrawable->y);
+ RegionIntersect(pReg, pClip, pReg);
- if (!REGION_NUM_RECTS(pReg)) {
+ if (!RegionNumRects(pReg)) {
goto out;
}
@@ -856,7 +856,7 @@ fallback:
xorg = pDrawable->x;
yorg = pDrawable->y;
- pextent = REGION_EXTENTS(pGC->pScreen, pClip);
+ pextent = RegionExtents(pClip);
extentX1 = pextent->x1;
extentY1 = pextent->y1;
extentX2 = pextent->x2;
@@ -883,7 +883,7 @@ fallback:
if ((fullX1 >= fullX2) || (fullY1 >= fullY2))
continue;
- n = REGION_NUM_RECTS (pClip);
+ n = RegionNumRects (pClip);
if (n == 1)
{
(*pExaScr->info->Solid) (pPixmap,
@@ -892,7 +892,7 @@ fallback:
}
else
{
- pbox = REGION_RECTS(pClip);
+ pbox = RegionRects(pClip);
/*
* clip the rectangle to each box in the clip region
* this is logically equivalent to calling Intersect(),
@@ -927,8 +927,8 @@ fallback:
exaMarkSync(pDrawable->pScreen);
out:
- REGION_UNINIT(pScreen, pReg);
- REGION_DESTROY(pScreen, pReg);
+ RegionUninit(pReg);
+ RegionDestroy(pReg);
}
const GCOps exaOps = {
@@ -964,14 +964,14 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
- REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy);
+ RegionTranslate(prgnSrc, -dx, -dy);
- REGION_INIT (pWin->drawable.pScreen, &rgnDst, NullBox, 0);
+ RegionInit(&rgnDst, NullBox, 0);
- REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, &pWin->borderClip, prgnSrc);
+ RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc);
#ifdef COMPOSITE
if (pPixmap->screen_x || pPixmap->screen_y)
- REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst,
+ RegionTranslate(&rgnDst,
-pPixmap->screen_x, -pPixmap->screen_y);
#endif
@@ -987,11 +987,11 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
pExaScr->fallback_flags &= ~EXA_ACCEL_COPYWINDOW;
fallback:
- REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
if (pExaScr->fallback_flags & EXA_FALLBACK_COPYWINDOW) {
pExaScr->fallback_flags &= ~EXA_FALLBACK_COPYWINDOW;
- REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, dx, dy);
+ RegionTranslate(prgnSrc, dx, dy);
ExaCheckCopyWindow(pWin, ptOldOrg, prgnSrc);
}
}
@@ -1007,7 +1007,7 @@ exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel,
Bool ret = FALSE;
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
- REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
+ RegionTranslate(pRegion, xoff, yoff);
if (pExaScr->fallback_counter || pExaPixmap->accel_blocked)
goto out;
@@ -1030,8 +1030,8 @@ exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel,
int nbox;
BoxPtr pBox;
- nbox = REGION_NUM_RECTS (pRegion);
- pBox = REGION_RECTS (pRegion);
+ nbox = RegionNumRects (pRegion);
+ pBox = RegionRects (pRegion);
while (nbox--)
{
@@ -1060,18 +1060,18 @@ exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel,
*(CARD8*)pExaPixmap->sys_ptr = pixel;
}
- REGION_UNION(pScreen, &pExaPixmap->validSys, &pExaPixmap->validSys,
+ RegionUnion(&pExaPixmap->validSys, &pExaPixmap->validSys,
pRegion);
- REGION_UNION(pScreen, &pExaPixmap->validFB, &pExaPixmap->validFB,
+ RegionUnion(&pExaPixmap->validFB, &pExaPixmap->validFB,
pRegion);
- REGION_SUBTRACT(pScreen, pending_damage, pending_damage, pRegion);
+ RegionSubtract(pending_damage, pending_damage, pRegion);
}
ret = TRUE;
}
out:
- REGION_TRANSLATE(pScreen, pRegion, -xoff, -yoff);
+ RegionTranslate(pRegion, -xoff, -yoff);
return ret;
}
@@ -1090,8 +1090,8 @@ exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
ExaPixmapPrivPtr pTileExaPixmap = ExaGetPixmapPriv(pTile);
int xoff, yoff;
int tileWidth, tileHeight;
- int nbox = REGION_NUM_RECTS (pRegion);
- BoxPtr pBox = REGION_RECTS (pRegion);
+ int nbox = RegionNumRects (pRegion);
+ BoxPtr pBox = RegionRects (pRegion);
Bool ret = FALSE;
int i;
@@ -1137,7 +1137,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
if ((*pExaScr->info->PrepareCopy) (pTile, pPixmap, 1, 1, alu, planemask))
{
if (xoff || yoff)
- REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
+ RegionTranslate(pRegion, xoff, yoff);
for (i = 0; i < nbox; i++)
{
@@ -1245,7 +1245,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
exaMarkSync(pDrawable->pScreen);
if (xoff || yoff)
- REGION_TRANSLATE(pScreen, pRegion, -xoff, -yoff);
+ RegionTranslate(pRegion, -xoff, -yoff);
}
return ret;
diff --git a/exa/exa_classic.c b/exa/exa_classic.c
index e1ead6c0d..0b0ca4eb8 100644
--- a/exa/exa_classic.c
+++ b/exa/exa_classic.c
@@ -131,8 +131,8 @@ exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
box.y1 = 0;
box.x2 = w;
box.y2 = h;
- REGION_INIT(pScreen, &pExaPixmap->validSys, &box, 0);
- REGION_INIT(pScreen, &pExaPixmap->validFB, &box, 0);
+ RegionInit(&pExaPixmap->validSys, &box, 0);
+ RegionInit(&pExaPixmap->validFB, &box, 0);
exaSetAccelBlock(pExaScr, pExaPixmap,
w, h, bpp);
@@ -237,8 +237,8 @@ exaDestroyPixmap_classic (PixmapPtr pPixmap)
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
pPixmap->devKind = pExaPixmap->sys_pitch;
}
- REGION_UNINIT(pPixmap->drawable.pScreen, &pExaPixmap->validSys);
- REGION_UNINIT(pPixmap->drawable.pScreen, &pExaPixmap->validFB);
+ RegionUninit(&pExaPixmap->validSys);
+ RegionUninit(&pExaPixmap->validFB);
}
swap(pExaScr, pScreen, DestroyPixmap);
diff --git a/exa/exa_migration_classic.c b/exa/exa_migration_classic.c
index 871679ffc..6c49fb798 100644
--- a/exa/exa_migration_classic.c
+++ b/exa/exa_migration_classic.c
@@ -78,8 +78,8 @@ exaPixmapIsDirty (PixmapPtr pPix)
if (!pExaPixmap->pDamage)
return FALSE;
- return REGION_NOTEMPTY (pScreen, DamageRegion(pExaPixmap->pDamage)) ||
- !REGION_EQUAL(pScreen, &pExaPixmap->validSys, &pExaPixmap->validFB);
+ return RegionNotEmpty(DamageRegion(pExaPixmap->pDamage)) ||
+ !RegionEqual(&pExaPixmap->validSys, &pExaPixmap->validFB);
}
/**
@@ -123,22 +123,22 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
/* Damaged bits are valid in current copy but invalid in other one */
if (pExaPixmap->use_gpu_copy) {
- REGION_UNION(pScreen, &pExaPixmap->validFB, &pExaPixmap->validFB,
+ RegionUnion(&pExaPixmap->validFB, &pExaPixmap->validFB,
damage);
- REGION_SUBTRACT(pScreen, &pExaPixmap->validSys, &pExaPixmap->validSys,
+ RegionSubtract(&pExaPixmap->validSys, &pExaPixmap->validSys,
damage);
} else {
- REGION_UNION(pScreen, &pExaPixmap->validSys, &pExaPixmap->validSys,
+ RegionUnion(&pExaPixmap->validSys, &pExaPixmap->validSys,
damage);
- REGION_SUBTRACT(pScreen, &pExaPixmap->validFB, &pExaPixmap->validFB,
+ RegionSubtract(&pExaPixmap->validFB, &pExaPixmap->validFB,
damage);
}
- REGION_EMPTY(pScreen, damage);
+ RegionEmpty(damage);
/* Copy bits valid in source but not in destination */
- REGION_NULL(pScreen, &CopyReg);
- REGION_SUBTRACT(pScreen, &CopyReg, pValidSrc, pValidDst);
+ RegionNull(&CopyReg);
+ RegionSubtract(&CopyReg, pValidSrc, pValidDst);
if (migrate->as_dst) {
ExaScreenPriv (pPixmap->drawable.pScreen);
@@ -153,7 +153,7 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
#if DEBUG_MIGRATE
- if (REGION_NIL(pending_damage)) {
+ if (RegionNil(pending_damage)) {
static Bool firsttime = TRUE;
if (firsttime) {
@@ -167,23 +167,23 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
* rects by filling it up to the extents of the union of the
* destination valid region and the pending damage region.
*/
- if (REGION_NUM_RECTS(pValidDst) > 10) {
+ if (RegionNumRects(pValidDst) > 10) {
BoxRec box;
BoxPtr pValidExt, pDamageExt;
RegionRec closure;
- pValidExt = REGION_EXTENTS(pScreen, pValidDst);
- pDamageExt = REGION_EXTENTS(pScreen, pending_damage);
+ pValidExt = RegionExtents(pValidDst);
+ pDamageExt = RegionExtents(pending_damage);
box.x1 = min(pValidExt->x1, pDamageExt->x1);
box.y1 = min(pValidExt->y1, pDamageExt->y1);
box.x2 = max(pValidExt->x2, pDamageExt->x2);
box.y2 = max(pValidExt->y2, pDamageExt->y2);
- REGION_INIT(pScreen, &closure, &box, 0);
- REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, &closure);
+ RegionInit(&closure, &box, 0);
+ RegionIntersect(&CopyReg, &CopyReg, &closure);
} else
- REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, pending_damage);
+ RegionIntersect(&CopyReg, &CopyReg, pending_damage);
}
/* The caller may provide a region to be subtracted from the calculated
@@ -191,17 +191,17 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
* contribute to the result of the operation.
*/
if (migrate->pReg)
- REGION_SUBTRACT(pScreen, &CopyReg, &CopyReg, migrate->pReg);
+ RegionSubtract(&CopyReg, &CopyReg, migrate->pReg);
} else {
/* The caller may restrict the region to be migrated for source pixmaps
* to what's relevant for the operation.
*/
if (migrate->pReg)
- REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, migrate->pReg);
+ RegionIntersect(&CopyReg, &CopyReg, migrate->pReg);
}
- pBox = REGION_RECTS(&CopyReg);
- nbox = REGION_NUM_RECTS(&CopyReg);
+ pBox = RegionRects(&CopyReg);
+ nbox = RegionNumRects(&CopyReg);
save_use_gpu_copy = pExaPixmap->use_gpu_copy;
save_pitch = pPixmap->devKind;
@@ -252,13 +252,13 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
* removing parts of it which are also in the destination valid region.
* Removing anything beyond that would lead to data loss.
*/
- if (REGION_NUM_RECTS(pValidSrc) > 20)
- REGION_SUBTRACT(pScreen, pValidSrc, pValidSrc, pValidDst);
+ if (RegionNumRects(pValidSrc) > 20)
+ RegionSubtract(pValidSrc, pValidSrc, pValidDst);
/* The copied bits are now valid in destination */
- REGION_UNION(pScreen, pValidDst, pValidDst, &CopyReg);
+ RegionUnion(pValidDst, pValidDst, &CopyReg);
- REGION_UNINIT(pScreen, &CopyReg);
+ RegionUninit(&CopyReg);
if (access_prepared)
exaFinishAccess(&pPixmap->drawable, fallback_index);
@@ -440,7 +440,7 @@ exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area)
/* Mark all FB bits as invalid, so all valid system bits get copied to FB
* next time */
- REGION_EMPTY(pPixmap->drawable.pScreen, &pExaPixmap->validFB);
+ RegionEmpty(&pExaPixmap->validFB);
}
/**
@@ -531,15 +531,15 @@ exaAssertNotDirty (PixmapPtr pPixmap)
if (exaPixmapIsPinned(pPixmap) || pExaPixmap->area == NULL)
return ret;
- REGION_NULL(pScreen, &ValidReg);
- REGION_INTERSECT(pScreen, &ValidReg, &pExaPixmap->validFB,
+ RegionNull(&ValidReg);
+ RegionIntersect(&ValidReg, &pExaPixmap->validFB,
&pExaPixmap->validSys);
- nbox = REGION_NUM_RECTS(&ValidReg);
+ nbox = RegionNumRects(&ValidReg);
if (!nbox)
goto out;
- pBox = REGION_RECTS(&ValidReg);
+ pBox = RegionRects(&ValidReg);
dst_pitch = pExaPixmap->sys_pitch;
src_pitch = pExaPixmap->fb_pitch;
@@ -586,7 +586,7 @@ skip:
pPixmap->devKind = save_pitch;
out:
- REGION_UNINIT(pScreen, &ValidReg);
+ RegionUninit(&ValidReg);
return ret;
}
diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c
index 49e04f22a..89cb137e4 100644
--- a/exa/exa_mixed.c
+++ b/exa/exa_mixed.c
@@ -180,7 +180,7 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
exaSetAccelBlock(pExaScr, pExaPixmap,
width, height, bitsPerPixel);
- REGION_EMPTY(pScreen, &pExaPixmap->validFB);
+ RegionEmpty(&pExaPixmap->validFB);
}
/* Need to re-create system copy if there's also a GPU copy */
@@ -192,7 +192,7 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
DamageDestroy(pExaPixmap->pDamage);
pExaPixmap->pDamage = NULL;
- REGION_EMPTY(pScreen, &pExaPixmap->validSys);
+ RegionEmpty(&pExaPixmap->validSys);
if (pExaScr->deferred_mixed_pixmap == pPixmap)
pExaScr->deferred_mixed_pixmap = NULL;
diff --git a/exa/exa_render.c b/exa/exa_render.c
index b7f383f38..6f2af8a8f 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -292,7 +292,7 @@ exaTryDriverSolidFill(PicturePtr pSrc,
exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y);
- REGION_TRANSLATE(pScreen, &region, dst_off_x, dst_off_y);
+ RegionTranslate(&region, dst_off_x, dst_off_y);
if (pSrc->pDrawable) {
pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable);
@@ -305,7 +305,7 @@ exaTryDriverSolidFill(PicturePtr pSrc,
!exaGetPixelFromRGBA(&pixel, red, green, blue, alpha,
pDst->pFormat))
{
- REGION_UNINIT(pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
return -1;
}
@@ -320,18 +320,18 @@ exaTryDriverSolidFill(PicturePtr pSrc,
}
if (!exaPixmapHasGpuCopy(pDstPix)) {
- REGION_UNINIT(pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
return 0;
}
if (!(*pExaScr->info->PrepareSolid) (pDstPix, GXcopy, 0xffffffff, pixel))
{
- REGION_UNINIT(pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
return -1;
}
- nbox = REGION_NUM_RECTS(&region);
- pbox = REGION_RECTS(&region);
+ nbox = RegionNumRects(&region);
+ pbox = RegionRects(&region);
while (nbox--)
{
@@ -342,7 +342,7 @@ exaTryDriverSolidFill(PicturePtr pSrc,
(*pExaScr->info->DoneSolid) (pDstPix);
exaMarkSync(pDst->pDrawable->pScreen);
- REGION_UNINIT(pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
return 1;
}
@@ -469,10 +469,10 @@ exaTryDriverCompositeRects(CARD8 op,
rects->width, rects->height))
goto next_rect;
- REGION_TRANSLATE(pScreen, &region, dst_off_x, dst_off_y);
+ RegionTranslate(&region, dst_off_x, dst_off_y);
- nbox = REGION_NUM_RECTS(&region);
- pbox = REGION_RECTS(&region);
+ nbox = RegionNumRects(&region);
+ pbox = RegionRects(&region);
xMask = xMask + mask_off_x - xDst - dst_off_x;
yMask = yMask + mask_off_y - yDst - dst_off_y;
@@ -494,7 +494,7 @@ exaTryDriverCompositeRects(CARD8 op,
}
next_rect:
- REGION_UNINIT(pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
rects++;
}
@@ -575,11 +575,11 @@ exaCompositeRects(CARD8 op,
* (see use of DamagePendingRegion in exaCopyDirty)
*/
- REGION_INIT(pScreen, &region, &box, 1);
+ RegionInit(&region, &box, 1);
DamageRegionAppend(pDst->pDrawable, &region);
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
}
/************************************************************/
@@ -703,7 +703,7 @@ exaTryDriverComposite(CARD8 op,
exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y);
- REGION_TRANSLATE(pScreen, &region, dst_off_x, dst_off_y);
+ RegionTranslate(&region, dst_off_x, dst_off_y);
if (pExaScr->do_migration) {
ExaMigrationRec pixmaps[3];
@@ -737,7 +737,7 @@ exaTryDriverComposite(CARD8 op,
if (pSrcPix) {
pSrcPix = exaGetOffscreenPixmap (pSrc->pDrawable, &src_off_x, &src_off_y);
if (!pSrcPix) {
- REGION_UNINIT(pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
return 0;
}
}
@@ -746,25 +746,25 @@ exaTryDriverComposite(CARD8 op,
pMaskPix = exaGetOffscreenPixmap (pMask->pDrawable, &mask_off_x,
&mask_off_y);
if (!pMaskPix) {
- REGION_UNINIT(pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
return 0;
}
}
if (!exaPixmapHasGpuCopy(pDstPix)) {
- REGION_UNINIT(pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
return 0;
}
if (!(*pExaScr->info->PrepareComposite) (op, pSrc, pMask, pDst, pSrcPix,
pMaskPix, pDstPix))
{
- REGION_UNINIT(pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
return -1;
}
- nbox = REGION_NUM_RECTS(&region);
- pbox = REGION_RECTS(&region);
+ nbox = RegionNumRects(&region);
+ pbox = RegionRects(&region);
xMask = xMask + mask_off_x - xDst - dst_off_x;
yMask = yMask + mask_off_y - yDst - dst_off_y;
@@ -788,7 +788,7 @@ exaTryDriverComposite(CARD8 op,
(*pExaScr->info->DoneComposite) (pDstPix);
exaMarkSync(pDst->pDrawable->pScreen);
- REGION_UNINIT(pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
return 1;
}
@@ -953,9 +953,9 @@ exaComposite(CARD8 op,
goto done;
ret = exaHWCopyNtoN(pSrc->pDrawable, pDst->pDrawable, NULL,
- REGION_RECTS(&region), REGION_NUM_RECTS(&region),
+ RegionRects(&region), RegionNumRects(&region),
xSrc - xDst, ySrc - yDst, FALSE, FALSE);
- REGION_UNINIT(pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
/* Reset values to their original values. */
xDst -= pDst->pDrawable->x;
@@ -1005,7 +1005,7 @@ exaComposite(CARD8 op,
(PixmapPtr)pSrc->pDrawable,
&patOrg, FB_ALLONES, GXcopy, CT_NONE);
- REGION_UNINIT(pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
if (ret)
goto done;
diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
index 402d76db9..a078cc114 100644
--- a/exa/exa_unaccel.c
+++ b/exa/exa_unaccel.c
@@ -131,10 +131,10 @@ ExaCheckCopyNtoN (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
PixmapPtr pPixmap = exaGetDrawablePixmap(pSrc);
exaGetDrawableDeltas(pSrc, pPixmap, &xoff, &yoff);
- REGION_INIT(pScreen, &reg, pbox, nbox);
- REGION_TRANSLATE(pScreen, &reg, xoff + dx, yoff + dy);
+ RegionInit(&reg, pbox, nbox);
+ RegionTranslate(&reg, xoff + dx, yoff + dy);
pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_SRC, &reg);
- REGION_UNINIT(pScreen, &reg);
+ RegionUninit(&reg);
} else
exaPrepareAccess (pSrc, EXA_PREPARE_SRC);
@@ -144,10 +144,10 @@ ExaCheckCopyNtoN (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
PixmapPtr pPixmap = exaGetDrawablePixmap(pDst);
exaGetDrawableDeltas(pSrc, pPixmap, &xoff, &yoff);
- REGION_INIT(pScreen, &reg, pbox, nbox);
- REGION_TRANSLATE(pScreen, &reg, xoff, yoff);
+ RegionInit(&reg, pbox, nbox);
+ RegionTranslate(&reg, xoff, yoff);
pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_DEST, &reg);
- REGION_UNINIT(pScreen, &reg);
+ RegionUninit(&reg);
} else
exaPrepareAccess (pDst, EXA_PREPARE_DEST);
@@ -188,9 +188,9 @@ ExaFallbackPrepareReg(DrawablePtr pDrawable,
box.x2 = box.x1 + width;
box.y2 = box.y1 + height;
- REGION_INIT(pScreen, &reg, &box, 1);
+ RegionInit(&reg, &box, 1);
pExaScr->prepare_access_reg(pPixmap, index, &reg);
- REGION_UNINIT(pScreen, &reg);
+ RegionUninit(&reg);
} else
exaPrepareAccess(pDrawable, index);
}
@@ -382,9 +382,9 @@ ExaCheckCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
int xoff, yoff;
exaGetDrawableDeltas(&pWin->drawable, pPixmap, &xoff, &yoff);
- REGION_TRANSLATE(pScreen, prgnSrc, xoff, yoff);
+ RegionTranslate(prgnSrc, xoff, yoff);
pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_SRC, prgnSrc);
- REGION_TRANSLATE(pScreen, prgnSrc, -xoff, -yoff);
+ RegionTranslate(prgnSrc, -xoff, -yoff);
} else
exaPrepareAccess(pDrawable, EXA_PREPARE_SRC);
@@ -458,9 +458,9 @@ ExaSrcValidate(DrawablePtr pDrawable,
dst = (pExaScr->srcPix == pPix) ? &pExaScr->srcReg :
&pExaScr->maskReg;
- REGION_INIT(pScreen, &reg, &box, 1);
- REGION_UNION(pScreen, dst, dst, &reg);
- REGION_UNINIT(pScreen, &reg);
+ RegionInit(&reg, &box, 1);
+ RegionUnion(dst, dst, &reg);
+ RegionUninit(&reg);
if (pExaScr->SavedSourceValidate) {
swap(pExaScr, pScreen, SourceValidate);
@@ -495,30 +495,30 @@ ExaPrepareCompositeReg(ScreenPtr pScreen,
Bool ret;
- REGION_NULL(pScreen, &region);
+ RegionNull(&region);
if (pSrc->pDrawable) {
pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable);
- REGION_NULL(pScreen, &pExaScr->srcReg);
+ RegionNull(&pExaScr->srcReg);
srcReg = &pExaScr->srcReg;
pExaScr->srcPix = pSrcPix;
if (pSrc != pDst)
- REGION_TRANSLATE(pScreen, pSrc->pCompositeClip,
+ RegionTranslate(pSrc->pCompositeClip,
-pSrc->pDrawable->x,
-pSrc->pDrawable->y);
}
if (pMask && pMask->pDrawable) {
pMaskPix = exaGetDrawablePixmap(pMask->pDrawable);
- REGION_NULL(pScreen, &pExaScr->maskReg);
+ RegionNull(&pExaScr->maskReg);
maskReg = &pExaScr->maskReg;
if (pMask != pDst && pMask != pSrc)
- REGION_TRANSLATE(pScreen, pMask->pCompositeClip,
+ RegionTranslate(pMask->pCompositeClip,
-pMask->pDrawable->x,
-pMask->pDrawable->y);
}
- REGION_TRANSLATE(pScreen, pDst->pCompositeClip,
+ RegionTranslate(pDst->pCompositeClip,
-pDst->pDrawable->x,
-pDst->pDrawable->y);
@@ -531,23 +531,23 @@ ExaPrepareCompositeReg(ScreenPtr pScreen,
width, height);
swap(pExaScr, pScreen, SourceValidate);
- REGION_TRANSLATE(pScreen, pDst->pCompositeClip,
+ RegionTranslate(pDst->pCompositeClip,
pDst->pDrawable->x,
pDst->pDrawable->y);
if (pSrc->pDrawable && pSrc != pDst)
- REGION_TRANSLATE(pScreen, pSrc->pCompositeClip,
+ RegionTranslate(pSrc->pCompositeClip,
pSrc->pDrawable->x,
pSrc->pDrawable->y);
if (pMask && pMask->pDrawable && pMask != pDst && pMask != pSrc)
- REGION_TRANSLATE(pScreen, pMask->pCompositeClip,
+ RegionTranslate(pMask->pCompositeClip,
pMask->pDrawable->x,
pMask->pDrawable->y);
if (!ret) {
if (srcReg)
- REGION_UNINIT(pScreen, srcReg);
+ RegionUninit(srcReg);
if (maskReg)
- REGION_UNINIT(pScreen, maskReg);
+ RegionUninit(maskReg);
return FALSE;
}
@@ -577,9 +577,9 @@ ExaPrepareCompositeReg(ScreenPtr pScreen,
maskReg);
if (srcReg)
- REGION_UNINIT(pScreen, srcReg);
+ RegionUninit(srcReg);
if (maskReg)
- REGION_UNINIT(pScreen, maskReg);
+ RegionUninit(maskReg);
pDstPix = exaGetDrawablePixmap(pDst->pDrawable);
if (!exaOpReadsDestination(op)) {
@@ -587,7 +587,7 @@ ExaPrepareCompositeReg(ScreenPtr pScreen,
int yoff;
exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &xoff, &yoff);
- REGION_TRANSLATE(pScreen, &region, pDst->pDrawable->x + xoff,
+ RegionTranslate(&region, pDst->pDrawable->x + xoff,
pDst->pDrawable->y + yoff);
dstReg = &region;
}
@@ -598,7 +598,7 @@ ExaPrepareCompositeReg(ScreenPtr pScreen,
dstReg);
pExaScr->prepare_access_reg(pDstPix, EXA_PREPARE_DEST, dstReg);
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
return TRUE;
}