summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-07-05 08:47:10 -0700
committerJamey Sharp <jamey@minilop.net>2011-12-14 18:30:27 -0800
commit7eb2e4ec06787ef4902186fefdf8309629e49d6e (patch)
treed09e576cc012459ad07171eddd39a3d6e330e24b
parentf41441b66e94e72919c3c02080ffaf7a69b4a2f6 (diff)
XAA: Move SYNC_CHECK into XAA_GC_OP_PROLOGUE.
Since every fallback checks whether it needs to sync, just do it in the prologue, like the pixmap ops do. Signed-off-by: Jamey Sharp <jamey@minilop.net>
-rw-r--r--hw/xfree86/xaa/xaaFallback.c20
-rw-r--r--hw/xfree86/xaa/xaawrap.h6
2 files changed, 4 insertions, 22 deletions
diff --git a/hw/xfree86/xaa/xaaFallback.c b/hw/xfree86/xaa/xaaFallback.c
index 4a1b1ddc5..1b05d9616 100644
--- a/hw/xfree86/xaa/xaaFallback.c
+++ b/hw/xfree86/xaa/xaaFallback.c
@@ -28,7 +28,6 @@ XAAFillSpansFallback(
int fSorted )
{
XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
(*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted);
XAA_GC_OP_EPILOGUE(pGC);
}
@@ -44,7 +43,6 @@ XAASetSpansFallback(
int fSorted )
{
XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
(*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted);
XAA_GC_OP_EPILOGUE(pGC);
}
@@ -60,7 +58,6 @@ XAAPutImageFallback(
char *pImage )
{
XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
(*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h,
leftPad, format, pImage);
XAA_GC_OP_EPILOGUE(pGC);
@@ -78,7 +75,6 @@ XAACopyAreaFallback(
RegionPtr ret;
XAA_GC_OP_PROLOGUE(pGC);
- SYNC_CHECK(pGC);
ret = (*pGC->ops->CopyArea)(pSrc, pDst,
pGC, srcx, srcy, width, height, dstx, dsty);
XAA_GC_OP_EPILOGUE(pGC);
@@ -98,7 +94,6 @@ XAACopyPlaneFallback(
RegionPtr ret;
XAA_GC_OP_PROLOGUE(pGC);
- SYNC_CHECK(pGC);
ret = (*pGC->ops->CopyPlane)(pSrc, pDst,
pGC, srcx, srcy, width, height, dstx, dsty, bitPlane);
XAA_GC_OP_EPILOGUE(pGC);
@@ -114,7 +109,6 @@ XAAPolyPointFallback(
xPoint *pptInit )
{
XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
(*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit);
XAA_GC_OP_EPILOGUE(pGC);
}
@@ -129,7 +123,6 @@ XAAPolylinesFallback(
DDXPointPtr pptInit )
{
XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
(*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit);
XAA_GC_OP_EPILOGUE(pGC);
}
@@ -142,7 +135,6 @@ XAAPolySegmentFallback(
xSegment *pSeg )
{
XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
(*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg);
XAA_GC_OP_EPILOGUE(pGC);
}
@@ -155,7 +147,6 @@ XAAPolyRectangleFallback(
xRectangle *pRectsInit )
{
XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
(*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit);
XAA_GC_OP_EPILOGUE(pGC);
}
@@ -168,7 +159,6 @@ XAAPolyArcFallback(
xArc *parcs )
{
XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
(*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs);
XAA_GC_OP_EPILOGUE(pGC);
}
@@ -183,7 +173,6 @@ XAAFillPolygonFallback(
DDXPointPtr ptsIn )
{
XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
(*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, ptsIn);
XAA_GC_OP_EPILOGUE(pGC);
}
@@ -197,7 +186,6 @@ XAAPolyFillRectFallback(
xRectangle *prectInit )
{
XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
(*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit);
XAA_GC_OP_EPILOGUE(pGC);
}
@@ -211,7 +199,6 @@ XAAPolyFillArcFallback(
xArc *parcs )
{
XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
(*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs);
XAA_GC_OP_EPILOGUE(pGC);
}
@@ -228,7 +215,6 @@ XAAPolyText8Fallback(
int ret;
XAA_GC_OP_PROLOGUE(pGC);
- SYNC_CHECK(pGC);
ret = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars);
XAA_GC_OP_EPILOGUE(pGC);
return ret;
@@ -246,7 +232,6 @@ XAAPolyText16Fallback(
int ret;
XAA_GC_OP_PROLOGUE(pGC);
- SYNC_CHECK(pGC);
ret = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars);
XAA_GC_OP_EPILOGUE(pGC);
return ret;
@@ -262,7 +247,6 @@ XAAImageText8Fallback(
char *chars )
{
XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
(*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars);
XAA_GC_OP_EPILOGUE(pGC);
}
@@ -277,7 +261,6 @@ XAAImageText16Fallback(
unsigned short *chars )
{
XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
(*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars);
XAA_GC_OP_EPILOGUE(pGC);
}
@@ -293,7 +276,6 @@ XAAImageGlyphBltFallback(
pointer pglyphBase )
{
XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
(*pGC->ops->ImageGlyphBlt)(pDraw, pGC, xInit, yInit, nglyph, ppci, pglyphBase);
XAA_GC_OP_EPILOGUE(pGC);
}
@@ -308,7 +290,6 @@ XAAPolyGlyphBltFallback(
pointer pglyphBase )
{
XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
(*pGC->ops->PolyGlyphBlt)(pDraw, pGC, xInit, yInit, nglyph, ppci, pglyphBase);
XAA_GC_OP_EPILOGUE(pGC);
}
@@ -321,7 +302,6 @@ XAAPushPixelsFallback(
int dx, int dy, int xOrg, int yOrg )
{
XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
(*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg);
XAA_GC_OP_EPILOGUE(pGC);
}
diff --git a/hw/xfree86/xaa/xaawrap.h b/hw/xfree86/xaa/xaawrap.h
index 3f3c26171..3e410db86 100644
--- a/hw/xfree86/xaa/xaawrap.h
+++ b/hw/xfree86/xaa/xaawrap.h
@@ -27,14 +27,16 @@
XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
GCFuncs *oldFuncs = pGC->funcs;\
pGC->funcs = pGCPriv->wrapFuncs;\
- pGC->ops = pGCPriv->wrapOps
+ pGC->ops = pGCPriv->wrapOps;\
+ SYNC_CHECK(pGC)
#define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\
XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
GCFuncs *oldFuncs = pGC->funcs;\
if(!RegionNumRects(pGC->pCompositeClip)) return; \
pGC->funcs = pGCPriv->wrapFuncs;\
- pGC->ops = pGCPriv->wrapOps
+ pGC->ops = pGCPriv->wrapOps;\
+ SYNC_CHECK(pGC)
#define XAA_GC_OP_EPILOGUE(pGC)\