aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/miext/damage
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/miext/damage')
-rwxr-xr-xnx-X11/programs/Xserver/miext/damage/Imakefile3
-rwxr-xr-xnx-X11/programs/Xserver/miext/damage/damage.c86
2 files changed, 45 insertions, 44 deletions
diff --git a/nx-X11/programs/Xserver/miext/damage/Imakefile b/nx-X11/programs/Xserver/miext/damage/Imakefile
index 7fa745b65..a28786203 100755
--- a/nx-X11/programs/Xserver/miext/damage/Imakefile
+++ b/nx-X11/programs/Xserver/miext/damage/Imakefile
@@ -11,7 +11,8 @@ OBJS = damage.o
INCLUDES = -I. -I../shadow -I../../mi -I../../fb -I../../include -I$(XINCLUDESRC) \
-I$(XF86SRC)/common $(EXTRAINCLUDES) \
- -I../../render -I../cw -I$(EXTINCSRC)
+ -I../../render -I../cw -I$(EXTINCSRC) \
+ `pkg-config --cflags-only-I pixman-1`
LINTLIBS = ../../dix/llib-ldix.ln ../../os/llib-los.ln \
../../mi/llib-lmi.ln
diff --git a/nx-X11/programs/Xserver/miext/damage/damage.c b/nx-X11/programs/Xserver/miext/damage/damage.c
index 0dd788ec3..60e2ae4b5 100755
--- a/nx-X11/programs/Xserver/miext/damage/damage.c
+++ b/nx-X11/programs/Xserver/miext/damage/damage.c
@@ -137,7 +137,7 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
#endif
/* short circuit for empty regions */
- if (!REGION_NOTEMPTY(pScreen, pRegion))
+ if (!RegionNotEmpty(pRegion))
return;
#ifdef COMPOSITE
@@ -152,7 +152,7 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
screen_y = ((PixmapPtr) pDrawable)->screen_y - pDrawable->y;
}
if (screen_x || screen_y)
- REGION_TRANSLATE (pScreen, pRegion, screen_x, screen_y);
+ RegionTranslate(pRegion, screen_x, screen_y);
#endif
if (pDrawable->type == DRAWABLE_WINDOW &&
@@ -160,22 +160,22 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
{
if (subWindowMode == ClipByChildren)
{
- REGION_INTERSECT(pScreen, pRegion, pRegion,
+ RegionIntersect(pRegion, pRegion,
&((WindowPtr)(pDrawable))->clipList);
}
else if (subWindowMode == IncludeInferiors)
{
RegionPtr pTempRegion =
NotClippedByChildren((WindowPtr)(pDrawable));
- REGION_INTERSECT(pScreen, pRegion, pRegion, pTempRegion);
- REGION_DESTROY(pScreen, pTempRegion);
+ RegionIntersect(pRegion, pRegion, pTempRegion);
+ RegionDestroy(pTempRegion);
}
/* If subWindowMode is set to an invalid value, don't perform
* any drawable-based clipping. */
}
- REGION_NULL (pScreen, &clippedRec);
+ RegionNull(&clippedRec);
for (; pDamage; pDamage = pNext)
{
pNext = pDamage->pNext;
@@ -223,7 +223,7 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
{
pDamageRegion = &clippedRec;
if (pDamage->pDrawable->type == DRAWABLE_WINDOW) {
- REGION_INTERSECT (pScreen, pDamageRegion, pRegion,
+ RegionIntersect(pDamageRegion, pRegion,
&((WindowPtr)(pDamage->pDrawable))->borderClip);
} else {
BoxRec box;
@@ -231,14 +231,14 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
box.y1 = draw_y;
box.x2 = draw_x + pDamage->pDrawable->width;
box.y2 = draw_y + pDamage->pDrawable->height;
- REGION_INIT(pScreen, &pixClip, &box, 1);
- REGION_INTERSECT (pScreen, pDamageRegion, pRegion, &pixClip);
- REGION_UNINIT(pScreen, &pixClip);
+ RegionInit(&pixClip, &box, 1);
+ RegionIntersect(pDamageRegion, pRegion, &pixClip);
+ RegionUninit(&pixClip);
}
/*
* Short circuit empty results
*/
- if (!REGION_NOTEMPTY(pScreen, pDamageRegion))
+ if (!RegionNotEmpty(pDamageRegion))
continue;
}
@@ -253,39 +253,39 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
* Move region to target coordinate space
*/
if (draw_x || draw_y)
- REGION_TRANSLATE (pScreen, pDamageRegion, -draw_x, -draw_y);
+ RegionTranslate(pDamageRegion, -draw_x, -draw_y);
switch (pDamage->damageLevel) {
case DamageReportRawRegion:
(*pDamage->damageReport) (pDamage, pDamageRegion, pDamage->closure);
break;
case DamageReportDeltaRegion:
- REGION_NULL (pScreen, &tmpRegion);
- REGION_SUBTRACT (pScreen, &tmpRegion, pDamageRegion, &pDamage->damage);
- if (REGION_NOTEMPTY (pScreen, &tmpRegion))
+ RegionNull(&tmpRegion);
+ RegionSubtract(&tmpRegion, pDamageRegion, &pDamage->damage);
+ if (RegionNotEmpty(&tmpRegion))
{
- REGION_UNION(pScreen, &pDamage->damage,
+ RegionUnion(&pDamage->damage,
&pDamage->damage, pDamageRegion);
(*pDamage->damageReport) (pDamage, &tmpRegion, pDamage->closure);
}
- REGION_UNINIT(pScreen, &tmpRegion);
+ RegionUninit(&tmpRegion);
break;
case DamageReportBoundingBox:
- tmpBox = *REGION_EXTENTS (pScreen, &pDamage->damage);
- REGION_UNION(pScreen, &pDamage->damage,
+ tmpBox = *RegionExtents(&pDamage->damage);
+ RegionUnion(&pDamage->damage,
&pDamage->damage, pDamageRegion);
- if (!BOX_SAME (&tmpBox, REGION_EXTENTS (pScreen, &pDamage->damage)))
+ if (!BOX_SAME (&tmpBox, RegionExtents(&pDamage->damage)))
(*pDamage->damageReport) (pDamage, &pDamage->damage, pDamage->closure);
break;
case DamageReportNonEmpty:
- was_empty = !REGION_NOTEMPTY(pScreen, &pDamage->damage);
- REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage,
+ was_empty = !RegionNotEmpty(&pDamage->damage);
+ RegionUnion(&pDamage->damage, &pDamage->damage,
pDamageRegion);
- if (was_empty && REGION_NOTEMPTY(pScreen, &pDamage->damage))
+ if (was_empty && RegionNotEmpty(&pDamage->damage))
(*pDamage->damageReport) (pDamage, &pDamage->damage, pDamage->closure);
break;
case DamageReportNone:
- REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage,
+ RegionUnion(&pDamage->damage, &pDamage->damage,
pDamageRegion);
break;
}
@@ -293,14 +293,14 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
* translate original region back
*/
if (pDamageRegion == pRegion && (draw_x || draw_y))
- REGION_TRANSLATE (pScreen, pDamageRegion, draw_x, draw_y);
+ RegionTranslate(pDamageRegion, draw_x, draw_y);
}
#ifdef COMPOSITE
if (screen_x || screen_y)
- REGION_TRANSLATE (pScreen, pRegion, -screen_x, -screen_y);
+ RegionTranslate(pRegion, -screen_x, -screen_y);
#endif
- REGION_UNINIT (pScreen, &clippedRec);
+ RegionUninit(&clippedRec);
}
#if DAMAGE_DEBUG_ENABLE
@@ -314,13 +314,13 @@ damageDamageBox (DrawablePtr pDrawable, BoxPtr pBox, int subWindowMode)
{
RegionRec region;
- REGION_INIT (pDrawable->pScreen, &region, pBox, 1);
+ RegionInit(&region, pBox, 1);
#if DAMAGE_DEBUG_ENABLE
_damageDamageRegion (pDrawable, &region, TRUE, subWindowMode, where);
#else
damageDamageRegion (pDrawable, &region, TRUE, subWindowMode);
#endif
- REGION_UNINIT (pDrawable->pScreen, &region);
+ RegionUninit(&region);
}
static void damageValidateGC(GCPtr, unsigned long, DrawablePtr);
@@ -489,7 +489,7 @@ damageDestroyClip(GCPtr pGC)
#define checkGCDamage(d,g) (getDrawableDamage(d) && \
(!g->pCompositeClip ||\
- REGION_NOTEMPTY(d->pScreen, \
+ RegionNotEmpty(\
g->pCompositeClip)))
#ifdef RENDER
@@ -503,7 +503,7 @@ damageDestroyClip(GCPtr pGC)
}
#define checkPictureDamage(p) (getDrawableDamage(p->pDrawable) && \
- REGION_NOTEMPTY(pScreen, p->pCompositeClip))
+ RegionNotEmpty(p->pCompositeClip))
static void
damageComposite (CARD8 op,
@@ -1615,9 +1615,9 @@ damageCopyWindow(WindowPtr pWindow,
* The region comes in source relative, but the damage occurs
* at the destination location. Translate back and forth.
*/
- REGION_TRANSLATE (pScreen, prgnSrc, dx, dy);
+ RegionTranslate(prgnSrc, dx, dy);
damageDamageRegion (&pWindow->drawable, prgnSrc, FALSE, -1);
- REGION_TRANSLATE (pScreen, prgnSrc, -dx, -dy);
+ RegionTranslate(prgnSrc, -dx, -dy);
}
unwrap (pScrPriv, pScreen, CopyWindow);
(*pScreen->CopyWindow) (pWindow, ptOldOrg, prgnSrc);
@@ -1820,7 +1820,7 @@ DamageCreate (DamageReportFunc damageReport,
return 0;
pDamage->pNext = 0;
pDamage->pNextWin = 0;
- REGION_NULL(pScreen, &pDamage->damage);
+ RegionNull(&pDamage->damage);
pDamage->damageLevel = damageLevel;
pDamage->isInternal = isInternal;
@@ -1909,7 +1909,7 @@ DamageDestroy (DamagePtr pDamage)
{
if (pDamage->damageDestroy)
(*pDamage->damageDestroy) (pDamage, pDamage->closure);
- REGION_UNINIT (pDamage->pDrawable->pScreen, &pDamage->damage);
+ RegionUninit(&pDamage->damage);
xfree (pDamage);
}
@@ -1921,7 +1921,7 @@ DamageSubtract (DamagePtr pDamage,
RegionRec pixmapClip;
DrawablePtr pDrawable = pDamage->pDrawable;
- REGION_SUBTRACT (pDrawable->pScreen, &pDamage->damage, &pDamage->damage, pRegion);
+ RegionSubtract(&pDamage->damage, &pDamage->damage, pRegion);
if (pDrawable)
{
if (pDrawable->type == DRAWABLE_WINDOW)
@@ -1934,22 +1934,22 @@ DamageSubtract (DamagePtr pDamage,
box.y1 = pDrawable->y;
box.x2 = pDrawable->x + pDrawable->width;
box.y2 = pDrawable->y + pDrawable->height;
- REGION_INIT (pDrawable->pScreen, &pixmapClip, &box, 1);
+ RegionInit(&pixmapClip, &box, 1);
pClip = &pixmapClip;
}
- REGION_TRANSLATE (pDrawable->pScreen, &pDamage->damage, pDrawable->x, pDrawable->y);
- REGION_INTERSECT (pDrawable->pScreen, &pDamage->damage, &pDamage->damage, pClip);
- REGION_TRANSLATE (pDrawable->pScreen, &pDamage->damage, -pDrawable->x, -pDrawable->y);
+ RegionTranslate(&pDamage->damage, pDrawable->x, pDrawable->y);
+ RegionIntersect(&pDamage->damage, &pDamage->damage, pClip);
+ RegionTranslate(&pDamage->damage, -pDrawable->x, -pDrawable->y);
if (pDrawable->type != DRAWABLE_WINDOW)
- REGION_UNINIT(pDrawable->pScreen, &pixmapClip);
+ RegionUninit(&pixmapClip);
}
- return REGION_NOTEMPTY (pDrawable->pScreen, &pDamage->damage);
+ return RegionNotEmpty(&pDamage->damage);
}
void
DamageEmpty (DamagePtr pDamage)
{
- REGION_EMPTY (pDamage->pDrawable->pScreen, &pDamage->damage);
+ RegionEmpty(&pDamage->damage);
}
RegionPtr