summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-05-21 15:05:48 -0700
committerKeith Packard <keithp@keithp.com>2010-06-05 18:59:00 -0700
commit2dc138922b7588515d5f2447e4b9dcdc0bef15e0 (patch)
tree004ca1d730f94a78150c30b3fbc0c87af31f2895 /glx
parentd17e726e89ef644310de77b960b715c2d11088da (diff)
Rename region macros to eliminate screen argument
This is a combination of a huge mechanical patch and a few small fixups required to finish the job. They were reviewed separately, but because the server does not build without both pieces, I've merged them together at this time. The mechanical changes were performed by running the included 'fix-region' script over the whole tree: $ git ls-files | grep -v '^fix-' | xargs ./fix-region And then, the white space errors in the resulting patch were fixed using the provided fix-patch-whitespace script. $ sh ./fix-patch-whitespace Thanks to Jamey Sharp for the mighty fine sed-generating sed script. The hand-done changes involve removing functions from dix/region.c that duplicate inline functions in include/regionstr.h, along with their declarations in regionstr.h, mi.h and mispans.h. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'glx')
-rw-r--r--glx/glxdri.c12
-rw-r--r--glx/glxdri2.c6
2 files changed, 9 insertions, 9 deletions
diff --git a/glx/glxdri.c b/glx/glxdri.c
index 131efcf39..32b35db4c 100644
--- a/glx/glxdri.c
+++ b/glx/glxdri.c
@@ -468,7 +468,7 @@ nooverride:
pRegion = NULL;
} else {
pRegion = DamageRegion(driDraw->pDamage);
- if (REGION_NIL(pRegion))
+ if (RegionNil(pRegion))
return Success;
}
@@ -531,8 +531,8 @@ nooverride:
int i, numRects;
BoxPtr p;
- numRects = REGION_NUM_RECTS (pRegion);
- p = REGION_RECTS (pRegion);
+ numRects = RegionNumRects (pRegion);
+ p = RegionRects (pRegion);
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, 0) );
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, 0) );
@@ -832,12 +832,12 @@ static void __glXReportDamage(__DRIdrawable *driDraw,
__glXenterServer(GL_FALSE);
- REGION_INIT(pDraw->pScreen, &region, (BoxPtr) rects, num_rects);
- REGION_TRANSLATE(pScreen, &region, pDraw->x, pDraw->y);
+ RegionInit(&region, (BoxPtr) rects, num_rects);
+ RegionTranslate(&region, pDraw->x, pDraw->y);
DamageRegionAppend(pDraw, &region);
/* This is wrong, this needs a seperate function. */
DamageRegionProcessPending(pDraw);
- REGION_UNINIT(pDraw->pScreen, &region);
+ RegionUninit(&region);
__glXleaveServer(GL_FALSE);
}
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index b971102d8..177c73ca2 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -122,7 +122,7 @@ __glXDRIdrawableCopySubBuffer(__GLXdrawable *drawable,
box.y1 = private->height - y - h;
box.x2 = x + w;
box.y2 = private->height - y;
- REGION_INIT(drawable->pDraw->pScreen, &region, &box, 0);
+ RegionInit(&region, &box, 0);
DRI2CopyRegion(drawable->pDraw, &region,
DRI2BufferFrontLeft, DRI2BufferBackLeft);
@@ -139,7 +139,7 @@ __glXDRIdrawableWaitX(__GLXdrawable *drawable)
box.y1 = 0;
box.x2 = private->width;
box.y2 = private->height;
- REGION_INIT(drawable->pDraw->pScreen, &region, &box, 0);
+ RegionInit(&region, &box, 0);
DRI2CopyRegion(drawable->pDraw, &region,
DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft);
@@ -156,7 +156,7 @@ __glXDRIdrawableWaitGL(__GLXdrawable *drawable)
box.y1 = 0;
box.x2 = private->width;
box.y2 = private->height;
- REGION_INIT(drawable->pDraw->pScreen, &region, &box, 0);
+ RegionInit(&region, &box, 0);
DRI2CopyRegion(drawable->pDraw, &region,
DRI2BufferFrontLeft, DRI2BufferFakeFrontLeft);