diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-06-25 18:08:15 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2011-12-14 18:30:27 -0800 |
commit | 86603e5d987a3ec2377b2caf113a93528a16808d (patch) | |
tree | 99df6b8a4af4653bb458948939a7fa18b81d1159 /hw/xfree86/xaa/xaaGC.c | |
parent | 7eb2e4ec06787ef4902186fefdf8309629e49d6e (diff) |
XAA: Merge pixmap GC ops into fallback GC ops.cleanup-xaa
They were already doing nearly identical work, although now the ops may
short-circuit in the pixmap case if pGC->pCompositeClip is an empty
region; before, only the fallback ops could do that.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Diffstat (limited to 'hw/xfree86/xaa/xaaGC.c')
-rw-r--r-- | hw/xfree86/xaa/xaaGC.c | 328 |
1 files changed, 0 insertions, 328 deletions
diff --git a/hw/xfree86/xaa/xaaGC.c b/hw/xfree86/xaa/xaaGC.c index a1a5c8831..02af37aa8 100644 --- a/hw/xfree86/xaa/xaaGC.c +++ b/hw/xfree86/xaa/xaaGC.c @@ -28,8 +28,6 @@ GCFuncs XAAGCFuncs = { XAAValidateGC, XAAChangeGC, XAACopyGC, XAADestroyGC, }; -extern GCOps XAAPixmapOps; - Bool XAACreateGC(GCPtr pGC) { @@ -277,329 +275,3 @@ XAACopyGC ( (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); XAA_GC_FUNC_EPILOGUE (pGCDst); } - -/**** Pixmap Wrappers ****/ - - - -static void -XAAFillSpansPixmap( - DrawablePtr pDraw, - GC *pGC, - int nInit, - DDXPointPtr pptInit, - int *pwidthInit, - int fSorted -){ - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - (*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted); - XAA_PIXMAP_OP_EPILOGUE(pGC); -} - -static void -XAASetSpansPixmap( - DrawablePtr pDraw, - GCPtr pGC, - char *pcharsrc, - register DDXPointPtr ppt, - int *pwidth, - int nspans, - int fSorted -){ - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - (*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted); - XAA_PIXMAP_OP_EPILOGUE(pGC); -} - -static void -XAAPutImagePixmap( - DrawablePtr pDraw, - GCPtr pGC, - int depth, - int x, int y, int w, int h, - int leftPad, - int format, - char *pImage -){ - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - (*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h, - leftPad, format, pImage); - XAA_PIXMAP_OP_EPILOGUE(pGC); -} - -static RegionPtr -XAACopyAreaPixmap( - DrawablePtr pSrc, - DrawablePtr pDst, - GC *pGC, - int srcx, int srcy, - int width, int height, - int dstx, int dsty -){ - XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - RegionPtr ret; - - if(infoRec->pScrn->vtSema && - ((pSrc->type == DRAWABLE_WINDOW) || IS_OFFSCREEN_PIXMAP(pSrc))) - { - if(infoRec->ReadPixmap && (pGC->alu == GXcopy) && - (pSrc->bitsPerPixel == pDst->bitsPerPixel) && - ((pGC->planemask & infoRec->FullPlanemasks[pSrc->depth - 1]) - == infoRec->FullPlanemasks[pSrc->depth - 1])) - { - XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDst)); - pixPriv->flags |= DIRTY; - - return (XAABitBlt( pSrc, pDst, pGC, - srcx, srcy, width, height, dstx, dsty, - XAADoImageRead, 0L)); - } - } - - { - XAA_PIXMAP_OP_PROLOGUE(pGC, pDst); - ret = (*pGC->ops->CopyArea)(pSrc, pDst, - pGC, srcx, srcy, width, height, dstx, dsty); - XAA_PIXMAP_OP_EPILOGUE(pGC); - } - return ret; -} - -static RegionPtr -XAACopyPlanePixmap( - DrawablePtr pSrc, - DrawablePtr pDst, - GCPtr pGC, - int srcx, int srcy, - int width, int height, - int dstx, int dsty, - unsigned long bitPlane -){ - RegionPtr ret; - - XAA_PIXMAP_OP_PROLOGUE(pGC, pDst); - ret = (*pGC->ops->CopyPlane)(pSrc, pDst, - pGC, srcx, srcy, width, height, dstx, dsty, bitPlane); - XAA_PIXMAP_OP_EPILOGUE(pGC); - return ret; -} - -static void -XAAPolyPointPixmap( - DrawablePtr pDraw, - GCPtr pGC, - int mode, - int npt, - xPoint *pptInit -){ - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - (*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit); - XAA_PIXMAP_OP_EPILOGUE(pGC); -} - - -static void -XAAPolylinesPixmap( - DrawablePtr pDraw, - GCPtr pGC, - int mode, - int npt, - DDXPointPtr pptInit -){ - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - (*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit); - XAA_PIXMAP_OP_EPILOGUE(pGC); -} - -static void -XAAPolySegmentPixmap( - DrawablePtr pDraw, - GCPtr pGC, - int nseg, - xSegment *pSeg -){ - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - (*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg); - XAA_PIXMAP_OP_EPILOGUE(pGC); -} - -static void -XAAPolyRectanglePixmap( - DrawablePtr pDraw, - GCPtr pGC, - int nRectsInit, - xRectangle *pRectsInit -){ - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - (*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit); - XAA_PIXMAP_OP_EPILOGUE(pGC); -} - -static void -XAAPolyArcPixmap( - DrawablePtr pDraw, - GCPtr pGC, - int narcs, - xArc *parcs -){ - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - (*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs); - XAA_PIXMAP_OP_EPILOGUE(pGC); -} - -static void -XAAFillPolygonPixmap( - DrawablePtr pDraw, - GCPtr pGC, - int shape, - int mode, - int count, - DDXPointPtr ptsIn -){ - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - (*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, ptsIn); - XAA_PIXMAP_OP_EPILOGUE(pGC); -} - - -static void -XAAPolyFillRectPixmap( - DrawablePtr pDraw, - GCPtr pGC, - int nrectFill, - xRectangle *prectInit -){ - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - (*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit); - XAA_PIXMAP_OP_EPILOGUE(pGC); -} - - -static void -XAAPolyFillArcPixmap( - DrawablePtr pDraw, - GCPtr pGC, - int narcs, - xArc *parcs -){ - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - (*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs); - XAA_PIXMAP_OP_EPILOGUE(pGC); -} - -static int -XAAPolyText8Pixmap( - DrawablePtr pDraw, - GCPtr pGC, - int x, - int y, - int count, - char *chars -){ - int ret; - - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - ret = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars); - XAA_PIXMAP_OP_EPILOGUE(pGC); - return ret; -} - -static int -XAAPolyText16Pixmap( - DrawablePtr pDraw, - GCPtr pGC, - int x, - int y, - int count, - unsigned short *chars -){ - int ret; - - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - ret = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars); - XAA_PIXMAP_OP_EPILOGUE(pGC); - return ret; -} - -static void -XAAImageText8Pixmap( - DrawablePtr pDraw, - GCPtr pGC, - int x, - int y, - int count, - char *chars -){ - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - (*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars); - XAA_PIXMAP_OP_EPILOGUE(pGC); -} -static void -XAAImageText16Pixmap( - DrawablePtr pDraw, - GCPtr pGC, - int x, - int y, - int count, - unsigned short *chars -){ - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - (*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars); - XAA_PIXMAP_OP_EPILOGUE(pGC); -} - - -static void -XAAImageGlyphBltPixmap( - DrawablePtr pDraw, - GCPtr pGC, - int xInit, int yInit, - unsigned int nglyph, - CharInfoPtr *ppci, - pointer pglyphBase -){ - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, xInit, yInit, nglyph, - ppci, pglyphBase); - XAA_PIXMAP_OP_EPILOGUE(pGC); -} - -static void -XAAPolyGlyphBltPixmap( - DrawablePtr pDraw, - GCPtr pGC, - int xInit, int yInit, - unsigned int nglyph, - CharInfoPtr *ppci, - pointer pglyphBase -){ - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - (*pGC->ops->PolyGlyphBlt)(pDraw, pGC, xInit, yInit, nglyph, - ppci, pglyphBase); - XAA_PIXMAP_OP_EPILOGUE(pGC); -} - -static void -XAAPushPixelsPixmap( - GCPtr pGC, - PixmapPtr pBitMap, - DrawablePtr pDraw, - int dx, int dy, int xOrg, int yOrg -){ - XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw); - (*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg); - XAA_PIXMAP_OP_EPILOGUE(pGC); -} - -GCOps XAAPixmapOps = { - XAAFillSpansPixmap, XAASetSpansPixmap, - XAAPutImagePixmap, XAACopyAreaPixmap, - XAACopyPlanePixmap, XAAPolyPointPixmap, - XAAPolylinesPixmap, XAAPolySegmentPixmap, - XAAPolyRectanglePixmap, XAAPolyArcPixmap, - XAAFillPolygonPixmap, XAAPolyFillRectPixmap, - XAAPolyFillArcPixmap, XAAPolyText8Pixmap, - XAAPolyText16Pixmap, XAAImageText8Pixmap, - XAAImageText16Pixmap, XAAImageGlyphBltPixmap, - XAAPolyGlyphBltPixmap, XAAPushPixelsPixmap, -}; |