diff options
Diffstat (limited to 'hw/xfree86/xaa/xaaFallback.c')
-rw-r--r-- | hw/xfree86/xaa/xaaFallback.c | 67 |
1 files changed, 44 insertions, 23 deletions
diff --git a/hw/xfree86/xaa/xaaFallback.c b/hw/xfree86/xaa/xaaFallback.c index 1b05d9616..aef06d6c4 100644 --- a/hw/xfree86/xaa/xaaFallback.c +++ b/hw/xfree86/xaa/xaaFallback.c @@ -29,7 +29,7 @@ XAAFillSpansFallback( { XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC); (*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); } static void @@ -44,7 +44,7 @@ XAASetSpansFallback( { XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC); (*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); } static void @@ -60,7 +60,7 @@ XAAPutImageFallback( XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC); (*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h, leftPad, format, pImage); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); } static RegionPtr @@ -72,12 +72,33 @@ XAACopyAreaFallback( int width, int height, int dstx, int dsty ) { + XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); RegionPtr ret; - XAA_GC_OP_PROLOGUE(pGC); - ret = (*pGC->ops->CopyArea)(pSrc, pDst, - pGC, srcx, srcy, width, height, dstx, dsty); - XAA_GC_OP_EPILOGUE(pGC); + if(infoRec->pScrn->vtSema && + (pDst->type == DRAWABLE_PIXMAP) && !IS_OFFSCREEN_PIXMAP(pDst) && + ((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_GC_OP_PROLOGUE(pGC); + ret = (*pGC->ops->CopyArea)(pSrc, pDst, + pGC, srcx, srcy, width, height, dstx, dsty); + XAA_GC_OP_EPILOGUE(pGC, pDst); + } return ret; } @@ -96,7 +117,7 @@ XAACopyPlaneFallback( XAA_GC_OP_PROLOGUE(pGC); ret = (*pGC->ops->CopyPlane)(pSrc, pDst, pGC, srcx, srcy, width, height, dstx, dsty, bitPlane); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDst); return ret; } @@ -110,7 +131,7 @@ XAAPolyPointFallback( { XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC); (*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); } @@ -124,7 +145,7 @@ XAAPolylinesFallback( { XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC); (*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); } static void @@ -136,7 +157,7 @@ XAAPolySegmentFallback( { XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC); (*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); } static void @@ -148,7 +169,7 @@ XAAPolyRectangleFallback( { XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC); (*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); } static void @@ -160,7 +181,7 @@ XAAPolyArcFallback( { XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC); (*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); } static void @@ -174,7 +195,7 @@ XAAFillPolygonFallback( { XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC); (*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, ptsIn); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); } @@ -187,7 +208,7 @@ XAAPolyFillRectFallback( { XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC); (*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); } @@ -200,7 +221,7 @@ XAAPolyFillArcFallback( { XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC); (*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); } static int @@ -216,7 +237,7 @@ XAAPolyText8Fallback( XAA_GC_OP_PROLOGUE(pGC); ret = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); return ret; } @@ -233,7 +254,7 @@ XAAPolyText16Fallback( XAA_GC_OP_PROLOGUE(pGC); ret = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); return ret; } @@ -248,7 +269,7 @@ XAAImageText8Fallback( { XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC); (*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); } static void @@ -262,7 +283,7 @@ XAAImageText16Fallback( { XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC); (*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); } @@ -277,7 +298,7 @@ XAAImageGlyphBltFallback( { XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC); (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, xInit, yInit, nglyph, ppci, pglyphBase); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); } static void @@ -291,7 +312,7 @@ XAAPolyGlyphBltFallback( { XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC); (*pGC->ops->PolyGlyphBlt)(pDraw, pGC, xInit, yInit, nglyph, ppci, pglyphBase); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); } static void @@ -303,7 +324,7 @@ XAAPushPixelsFallback( { XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC); (*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg); - XAA_GC_OP_EPILOGUE(pGC); + XAA_GC_OP_EPILOGUE(pGC, pDraw); } GCOps XAAFallbackOps = { |