aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/xaa
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-09-14 13:17:20 +0000
committermarha <marha@users.sourceforge.net>2010-09-14 13:17:20 +0000
commit3815190d52f8ae453c2458335394eb5b18ab9bf5 (patch)
treef1d30ef6d20654c2b6e201dec66426f99465bea2 /xorg-server/hw/xfree86/xaa
parent9e19f3933a9c37ea36ce295b6434bbd326fe44ad (diff)
downloadvcxsrv-3815190d52f8ae453c2458335394eb5b18ab9bf5.tar.gz
vcxsrv-3815190d52f8ae453c2458335394eb5b18ab9bf5.tar.bz2
vcxsrv-3815190d52f8ae453c2458335394eb5b18ab9bf5.zip
xserver libX11 pixman git update 14/9/2010
Diffstat (limited to 'xorg-server/hw/xfree86/xaa')
-rw-r--r--xorg-server/hw/xfree86/xaa/Makefile.am148
-rw-r--r--xorg-server/hw/xfree86/xaa/xaaFallback.c703
-rw-r--r--xorg-server/hw/xfree86/xaa/xaaGC.c6
-rw-r--r--xorg-server/hw/xfree86/xaa/xaaWrapper.c477
-rw-r--r--xorg-server/hw/xfree86/xaa/xaaWrapper.h10
5 files changed, 425 insertions, 919 deletions
diff --git a/xorg-server/hw/xfree86/xaa/Makefile.am b/xorg-server/hw/xfree86/xaa/Makefile.am
index e9f5e687c..ccba713a6 100644
--- a/xorg-server/hw/xfree86/xaa/Makefile.am
+++ b/xorg-server/hw/xfree86/xaa/Makefile.am
@@ -1,74 +1,74 @@
-LSB_FIRST = l-xaaBitmap.c l-xaaStipple.c l-xaaTEGlyph.c
-LSB_3_FIRST = l3-xaaBitmap.c l3-xaaStipple.c
-MSB_FIRST = m-xaaBitmap.c m-xaaStipple.c m-xaaTEGlyph.c
-MSB_3_FIRST = m3-xaaBitmap.c m3-xaaStipple.c
-LSB_FIXED = lf-xaaBitmap.c lf-xaaStipple.c lf-xaaTEGlyph.c
-LSB_3_FIXED = lf3-xaaBitmap.c lf3-xaaStipple.c
-MSB_FIXED = mf-xaaBitmap.c mf-xaaStipple.c mf-xaaTEGlyph.c
-MSB_3_FIXED = mf3-xaaBitmap.c mf3-xaaStipple.c
-POLYSEG = s-xaaLine.c s-xaaDashLine.c
-
-libxaa_la_LDFLAGS = -avoid-version
-if COMPOSITE
-libxaa_la_LIBADD = $(top_builddir)/miext/cw/libcw.la
-endif
-
-module_LTLIBRARIES = libxaa.la
-libxaa_la_SOURCES = xaaInit.c xaaGC.c xaaInitAccel.c xaaFallback.c \
- xaaBitBlt.c xaaCpyArea.c xaaGCmisc.c xaaCpyWin.c \
- xaaCpyPlane.c xaaFillRect.c xaaTEText.c xaaNonTEText.c \
- xaaPCache.c xaaSpans.c xaaROP.c xaaImage.c xaaWrapper.c \
- xaaRect.c xaaLineMisc.c xaaBitOrder.c \
- xaaFillPoly.c xaaWideLine.c xaaTables.c xaaFillArc.c \
- xaaLine.c xaaDashLine.c xaaOverlay.c xaaOffscreen.c \
- xaaOverlayDF.c xaaStateChange.c xaaPict.c $(POLYSEG) \
- $(LSB_FIRST) $(MSB_FIRST) $(LSB_FIXED) $(MSB_FIXED) \
- $(LSB_3_FIRST) $(MSB_3_FIRST) $(LSB_3_FIXED) $(MSB_3_FIXED)
-${POLYSEG}:
- echo "#define POLYSEGMENT" > $@
- echo '#include "$(srcdir)/${@:s-%=%}"' >> $@
-${LSB_FIRST}:
- echo "#define LSBFIRST" > $@
- echo '#include "$(srcdir)/${@:l-%=%}"' >> $@
-${LSB_3_FIRST}:
- echo "#define LSBFIRST" > $@
- echo "#define TRIPLE_BITS" >> $@
- echo '#include "$(srcdir)/${@:l3-%=%}"' >> $@
-${LSB_FIXED}:
- echo "#define LSBFIRST" > $@
- echo "#define FIXEDBASE" >> $@
- echo '#include "$(srcdir)/${@:lf-%=%}"' >> $@
-${LSB_3_FIXED}:
- echo "#define LSBFIRST" > $@
- echo "#define TRIPLE_BITS" >> $@
- echo "#define FIXEDBASE" >> $@
- echo '#include "$(srcdir)/${@:lf3-%=%}"' >> $@
-${MSB_FIRST}:
- echo "#define MSBFIRST" > $@
- echo '#include "$(srcdir)/${@:m-%=%}"' >> $@
-${MSB_3_FIRST}:
- echo "#define MSBFIRST" > $@
- echo "#define TRIPLE_BITS" >> $@
- echo '#include "$(srcdir)/${@:m3-%=%}"' >> $@
-${MSB_FIXED}:
- echo "#define MSBFIRST" > $@
- echo "#define FIXEDBASE" >> $@
- echo '#include "$(srcdir)/${@:mf-%=%}"' >> $@
-${MSB_3_FIXED}:
- echo "#define MSBFIRST" > $@
- echo "#define TRIPLE_BITS" >> $@
- echo "#define FIXEDBASE" >> $@
- echo '#include "$(srcdir)/${@:mf3-%=%}"' >> $@
-
-DISTCLEANFILES = $(POLYSEG) \
- $(LSB_FIRST) $(LSB_FIXED) $(MSB_FIRST) $(MSB_FIXED) \
- $(LSB_3_FIRST) $(LSB_3_FIXED) $(MSB_3_FIRST) $(MSB_3_FIXED)
-
-sdk_HEADERS = xaa.h xaalocal.h xaarop.h xaaWrapper.h
-EXTRA_DIST = xaacexp.h xaawrap.h xaaLine.c xaaDashLine.c \
- xaaStipple.c xaaTEGlyph.c xaaNonTEGlyph.c xaaBitmap.c \
- XAA.HOWTO
-
-INCLUDES = $(XORG_INCS) -I$(srcdir)/../../../miext/cw
-
-AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
+LSB_FIRST = l-xaaBitmap.c l-xaaStipple.c l-xaaTEGlyph.c
+LSB_3_FIRST = l3-xaaBitmap.c l3-xaaStipple.c
+MSB_FIRST = m-xaaBitmap.c m-xaaStipple.c m-xaaTEGlyph.c
+MSB_3_FIRST = m3-xaaBitmap.c m3-xaaStipple.c
+LSB_FIXED = lf-xaaBitmap.c lf-xaaStipple.c lf-xaaTEGlyph.c
+LSB_3_FIXED = lf3-xaaBitmap.c lf3-xaaStipple.c
+MSB_FIXED = mf-xaaBitmap.c mf-xaaStipple.c mf-xaaTEGlyph.c
+MSB_3_FIXED = mf3-xaaBitmap.c mf3-xaaStipple.c
+POLYSEG = s-xaaLine.c s-xaaDashLine.c
+
+libxaa_la_LDFLAGS = -avoid-version
+if COMPOSITE
+libxaa_la_LIBADD = $(top_builddir)/miext/cw/libcw.la
+endif
+
+module_LTLIBRARIES = libxaa.la
+libxaa_la_SOURCES = xaaInit.c xaaGC.c xaaInitAccel.c xaaFallback.c \
+ xaaBitBlt.c xaaCpyArea.c xaaGCmisc.c xaaCpyWin.c \
+ xaaCpyPlane.c xaaFillRect.c xaaTEText.c xaaNonTEText.c \
+ xaaPCache.c xaaSpans.c xaaROP.c xaaImage.c \
+ xaaRect.c xaaLineMisc.c xaaBitOrder.c \
+ xaaFillPoly.c xaaWideLine.c xaaTables.c xaaFillArc.c \
+ xaaLine.c xaaDashLine.c xaaOverlay.c xaaOffscreen.c \
+ xaaOverlayDF.c xaaStateChange.c xaaPict.c $(POLYSEG) \
+ $(LSB_FIRST) $(MSB_FIRST) $(LSB_FIXED) $(MSB_FIXED) \
+ $(LSB_3_FIRST) $(MSB_3_FIRST) $(LSB_3_FIXED) $(MSB_3_FIXED)
+${POLYSEG}:
+ echo "#define POLYSEGMENT" > $@
+ echo '#include "$(srcdir)/${@:s-%=%}"' >> $@
+${LSB_FIRST}:
+ echo "#define LSBFIRST" > $@
+ echo '#include "$(srcdir)/${@:l-%=%}"' >> $@
+${LSB_3_FIRST}:
+ echo "#define LSBFIRST" > $@
+ echo "#define TRIPLE_BITS" >> $@
+ echo '#include "$(srcdir)/${@:l3-%=%}"' >> $@
+${LSB_FIXED}:
+ echo "#define LSBFIRST" > $@
+ echo "#define FIXEDBASE" >> $@
+ echo '#include "$(srcdir)/${@:lf-%=%}"' >> $@
+${LSB_3_FIXED}:
+ echo "#define LSBFIRST" > $@
+ echo "#define TRIPLE_BITS" >> $@
+ echo "#define FIXEDBASE" >> $@
+ echo '#include "$(srcdir)/${@:lf3-%=%}"' >> $@
+${MSB_FIRST}:
+ echo "#define MSBFIRST" > $@
+ echo '#include "$(srcdir)/${@:m-%=%}"' >> $@
+${MSB_3_FIRST}:
+ echo "#define MSBFIRST" > $@
+ echo "#define TRIPLE_BITS" >> $@
+ echo '#include "$(srcdir)/${@:m3-%=%}"' >> $@
+${MSB_FIXED}:
+ echo "#define MSBFIRST" > $@
+ echo "#define FIXEDBASE" >> $@
+ echo '#include "$(srcdir)/${@:mf-%=%}"' >> $@
+${MSB_3_FIXED}:
+ echo "#define MSBFIRST" > $@
+ echo "#define TRIPLE_BITS" >> $@
+ echo "#define FIXEDBASE" >> $@
+ echo '#include "$(srcdir)/${@:mf3-%=%}"' >> $@
+
+DISTCLEANFILES = $(POLYSEG) \
+ $(LSB_FIRST) $(LSB_FIXED) $(MSB_FIRST) $(MSB_FIXED) \
+ $(LSB_3_FIRST) $(LSB_3_FIXED) $(MSB_3_FIRST) $(MSB_3_FIXED)
+
+sdk_HEADERS = xaa.h xaalocal.h xaarop.h
+EXTRA_DIST = xaacexp.h xaawrap.h xaaLine.c xaaDashLine.c \
+ xaaStipple.c xaaTEGlyph.c xaaNonTEGlyph.c xaaBitmap.c \
+ XAA.HOWTO
+
+INCLUDES = $(XORG_INCS) -I$(srcdir)/../../../miext/cw
+
+AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
diff --git a/xorg-server/hw/xfree86/xaa/xaaFallback.c b/xorg-server/hw/xfree86/xaa/xaaFallback.c
index 7ab4031f8..744fd0a21 100644
--- a/xorg-server/hw/xfree86/xaa/xaaFallback.c
+++ b/xorg-server/hw/xfree86/xaa/xaaFallback.c
@@ -1,352 +1,351 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "misc.h"
-#include "xf86.h"
-#include "xf86_OSproc.h"
-
-#include <X11/X.h>
-#include "scrnintstr.h"
-#include "xf86str.h"
-#include "xaa.h"
-#include "xaalocal.h"
-#include "gcstruct.h"
-#include "pixmapstr.h"
-#include "xaawrap.h"
-
-
-
-static void
-XAAFillSpansFallback(
- DrawablePtr pDraw,
- GC *pGC,
- int nInit,
- DDXPointPtr pptInit,
- int *pwidthInit,
- 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);
-}
-
-static void
-XAASetSpansFallback(
- DrawablePtr pDraw,
- GCPtr pGC,
- char *pcharsrc,
- register DDXPointPtr ppt,
- int *pwidth,
- int nspans,
- 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);
-}
-
-static void
-XAAPutImageFallback(
- DrawablePtr pDraw,
- GCPtr pGC,
- int depth,
- int x, int y, int w, int h,
- int leftPad,
- int format,
- 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);
-}
-
-static RegionPtr
-XAACopyAreaFallback(
- DrawablePtr pSrc,
- DrawablePtr pDst,
- GC *pGC,
- int srcx, int srcy,
- int width, int height,
- int dstx, int dsty )
-{
- RegionPtr ret;
-
- XAA_GC_OP_PROLOGUE(pGC);
- if((pSrc->type == DRAWABLE_WINDOW) || (pDst->type == DRAWABLE_WINDOW) ||
- IS_OFFSCREEN_PIXMAP(pSrc) || IS_OFFSCREEN_PIXMAP(pDst)) {
- SYNC_CHECK(pGC);
- }
- ret = (*pGC->ops->CopyArea)(pSrc, pDst,
- pGC, srcx, srcy, width, height, dstx, dsty);
- XAA_GC_OP_EPILOGUE(pGC);
- return ret;
-}
-
-static RegionPtr
-XAACopyPlaneFallback(
- DrawablePtr pSrc,
- DrawablePtr pDst,
- GCPtr pGC,
- int srcx, int srcy,
- int width, int height,
- int dstx, int dsty,
- unsigned long bitPlane )
-{
- RegionPtr ret;
-
- XAA_GC_OP_PROLOGUE(pGC);
- if((pSrc->type == DRAWABLE_WINDOW) || (pDst->type == DRAWABLE_WINDOW) ||
- IS_OFFSCREEN_PIXMAP(pSrc) || IS_OFFSCREEN_PIXMAP(pDst)) {
- SYNC_CHECK(pGC);
- }
- ret = (*pGC->ops->CopyPlane)(pSrc, pDst,
- pGC, srcx, srcy, width, height, dstx, dsty, bitPlane);
- XAA_GC_OP_EPILOGUE(pGC);
- return ret;
-}
-
-static void
-XAAPolyPointFallback(
- DrawablePtr pDraw,
- GCPtr pGC,
- int mode,
- int npt,
- 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);
-}
-
-
-static void
-XAAPolylinesFallback(
- DrawablePtr pDraw,
- GCPtr pGC,
- int mode,
- int npt,
- 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);
-}
-
-static void
-XAAPolySegmentFallback(
- DrawablePtr pDraw,
- GCPtr pGC,
- int nseg,
- xSegment *pSeg )
-{
- XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
- (*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg);
- XAA_GC_OP_EPILOGUE(pGC);
-}
-
-static void
-XAAPolyRectangleFallback(
- DrawablePtr pDraw,
- GCPtr pGC,
- int nRectsInit,
- xRectangle *pRectsInit )
-{
- XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
- (*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit);
- XAA_GC_OP_EPILOGUE(pGC);
-}
-
-static void
-XAAPolyArcFallback(
- DrawablePtr pDraw,
- GCPtr pGC,
- int narcs,
- xArc *parcs )
-{
- XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
- (*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs);
- XAA_GC_OP_EPILOGUE(pGC);
-}
-
-static void
-XAAFillPolygonFallback(
- DrawablePtr pDraw,
- GCPtr pGC,
- int shape,
- int mode,
- int count,
- 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);
-}
-
-
-static void
-XAAPolyFillRectFallback(
- DrawablePtr pDraw,
- GCPtr pGC,
- int nrectFill,
- xRectangle *prectInit )
-{
- XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
- (*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit);
- XAA_GC_OP_EPILOGUE(pGC);
-}
-
-
-static void
-XAAPolyFillArcFallback(
- DrawablePtr pDraw,
- GCPtr pGC,
- int narcs,
- xArc *parcs )
-{
- XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
- SYNC_CHECK(pGC);
- (*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs);
- XAA_GC_OP_EPILOGUE(pGC);
-}
-
-static int
-XAAPolyText8Fallback(
- DrawablePtr pDraw,
- GCPtr pGC,
- int x,
- int y,
- int count,
- char *chars )
-{
- 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;
-}
-
-static int
-XAAPolyText16Fallback(
- DrawablePtr pDraw,
- GCPtr pGC,
- int x,
- int y,
- int count,
- unsigned short *chars )
-{
- 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;
-}
-
-static void
-XAAImageText8Fallback(
- DrawablePtr pDraw,
- GCPtr pGC,
- int x,
- int y,
- int count,
- 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);
-}
-
-static void
-XAAImageText16Fallback(
- DrawablePtr pDraw,
- GCPtr pGC,
- int x,
- int y,
- int count,
- 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);
-}
-
-
-static void
-XAAImageGlyphBltFallback(
- DrawablePtr pDraw,
- GCPtr pGC,
- int xInit, int yInit,
- unsigned int nglyph,
- CharInfoPtr *ppci,
- 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);
-}
-
-static void
-XAAPolyGlyphBltFallback(
- DrawablePtr pDraw,
- GCPtr pGC,
- int xInit, int yInit,
- unsigned int nglyph,
- CharInfoPtr *ppci,
- 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);
-}
-
-static void
-XAAPushPixelsFallback(
- GCPtr pGC,
- PixmapPtr pBitMap,
- DrawablePtr pDraw,
- 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);
-}
-
-GCOps XAAFallbackOps = {
- XAAFillSpansFallback, XAASetSpansFallback,
- XAAPutImageFallback, XAACopyAreaFallback,
- XAACopyPlaneFallback, XAAPolyPointFallback,
- XAAPolylinesFallback, XAAPolySegmentFallback,
- XAAPolyRectangleFallback, XAAPolyArcFallback,
- XAAFillPolygonFallback, XAAPolyFillRectFallback,
- XAAPolyFillArcFallback, XAAPolyText8Fallback,
- XAAPolyText16Fallback, XAAImageText8Fallback,
- XAAImageText16Fallback, XAAImageGlyphBltFallback,
- XAAPolyGlyphBltFallback, XAAPushPixelsFallback,
- {NULL} /* devPrivate */
-};
-
-GCOps *XAAGetFallbackOps(void)
-{
- return &XAAFallbackOps;
-}
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include "misc.h"
+#include "xf86.h"
+#include "xf86_OSproc.h"
+
+#include <X11/X.h>
+#include "scrnintstr.h"
+#include "xf86str.h"
+#include "xaa.h"
+#include "xaalocal.h"
+#include "gcstruct.h"
+#include "pixmapstr.h"
+#include "xaawrap.h"
+
+
+
+static void
+XAAFillSpansFallback(
+ DrawablePtr pDraw,
+ GC *pGC,
+ int nInit,
+ DDXPointPtr pptInit,
+ int *pwidthInit,
+ 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);
+}
+
+static void
+XAASetSpansFallback(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ char *pcharsrc,
+ register DDXPointPtr ppt,
+ int *pwidth,
+ int nspans,
+ 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);
+}
+
+static void
+XAAPutImageFallback(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int depth,
+ int x, int y, int w, int h,
+ int leftPad,
+ int format,
+ 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);
+}
+
+static RegionPtr
+XAACopyAreaFallback(
+ DrawablePtr pSrc,
+ DrawablePtr pDst,
+ GC *pGC,
+ int srcx, int srcy,
+ int width, int height,
+ int dstx, int dsty )
+{
+ RegionPtr ret;
+
+ XAA_GC_OP_PROLOGUE(pGC);
+ if((pSrc->type == DRAWABLE_WINDOW) || (pDst->type == DRAWABLE_WINDOW) ||
+ IS_OFFSCREEN_PIXMAP(pSrc) || IS_OFFSCREEN_PIXMAP(pDst)) {
+ SYNC_CHECK(pGC);
+ }
+ ret = (*pGC->ops->CopyArea)(pSrc, pDst,
+ pGC, srcx, srcy, width, height, dstx, dsty);
+ XAA_GC_OP_EPILOGUE(pGC);
+ return ret;
+}
+
+static RegionPtr
+XAACopyPlaneFallback(
+ DrawablePtr pSrc,
+ DrawablePtr pDst,
+ GCPtr pGC,
+ int srcx, int srcy,
+ int width, int height,
+ int dstx, int dsty,
+ unsigned long bitPlane )
+{
+ RegionPtr ret;
+
+ XAA_GC_OP_PROLOGUE(pGC);
+ if((pSrc->type == DRAWABLE_WINDOW) || (pDst->type == DRAWABLE_WINDOW) ||
+ IS_OFFSCREEN_PIXMAP(pSrc) || IS_OFFSCREEN_PIXMAP(pDst)) {
+ SYNC_CHECK(pGC);
+ }
+ ret = (*pGC->ops->CopyPlane)(pSrc, pDst,
+ pGC, srcx, srcy, width, height, dstx, dsty, bitPlane);
+ XAA_GC_OP_EPILOGUE(pGC);
+ return ret;
+}
+
+static void
+XAAPolyPointFallback(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ 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);
+}
+
+
+static void
+XAAPolylinesFallback(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int mode,
+ int npt,
+ 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);
+}
+
+static void
+XAAPolySegmentFallback(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int nseg,
+ xSegment *pSeg )
+{
+ XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
+ SYNC_CHECK(pGC);
+ (*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg);
+ XAA_GC_OP_EPILOGUE(pGC);
+}
+
+static void
+XAAPolyRectangleFallback(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int nRectsInit,
+ xRectangle *pRectsInit )
+{
+ XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
+ SYNC_CHECK(pGC);
+ (*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit);
+ XAA_GC_OP_EPILOGUE(pGC);
+}
+
+static void
+XAAPolyArcFallback(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int narcs,
+ xArc *parcs )
+{
+ XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
+ SYNC_CHECK(pGC);
+ (*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs);
+ XAA_GC_OP_EPILOGUE(pGC);
+}
+
+static void
+XAAFillPolygonFallback(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int shape,
+ int mode,
+ int count,
+ 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);
+}
+
+
+static void
+XAAPolyFillRectFallback(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int nrectFill,
+ xRectangle *prectInit )
+{
+ XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
+ SYNC_CHECK(pGC);
+ (*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit);
+ XAA_GC_OP_EPILOGUE(pGC);
+}
+
+
+static void
+XAAPolyFillArcFallback(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int narcs,
+ xArc *parcs )
+{
+ XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC);
+ SYNC_CHECK(pGC);
+ (*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs);
+ XAA_GC_OP_EPILOGUE(pGC);
+}
+
+static int
+XAAPolyText8Fallback(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int x,
+ int y,
+ int count,
+ char *chars )
+{
+ 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;
+}
+
+static int
+XAAPolyText16Fallback(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int x,
+ int y,
+ int count,
+ unsigned short *chars )
+{
+ 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;
+}
+
+static void
+XAAImageText8Fallback(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int x,
+ int y,
+ int count,
+ 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);
+}
+
+static void
+XAAImageText16Fallback(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int x,
+ int y,
+ int count,
+ 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);
+}
+
+
+static void
+XAAImageGlyphBltFallback(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int xInit, int yInit,
+ unsigned int nglyph,
+ CharInfoPtr *ppci,
+ 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);
+}
+
+static void
+XAAPolyGlyphBltFallback(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ int xInit, int yInit,
+ unsigned int nglyph,
+ CharInfoPtr *ppci,
+ 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);
+}
+
+static void
+XAAPushPixelsFallback(
+ GCPtr pGC,
+ PixmapPtr pBitMap,
+ DrawablePtr pDraw,
+ 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);
+}
+
+GCOps XAAFallbackOps = {
+ XAAFillSpansFallback, XAASetSpansFallback,
+ XAAPutImageFallback, XAACopyAreaFallback,
+ XAACopyPlaneFallback, XAAPolyPointFallback,
+ XAAPolylinesFallback, XAAPolySegmentFallback,
+ XAAPolyRectangleFallback, XAAPolyArcFallback,
+ XAAFillPolygonFallback, XAAPolyFillRectFallback,
+ XAAPolyFillArcFallback, XAAPolyText8Fallback,
+ XAAPolyText16Fallback, XAAImageText8Fallback,
+ XAAImageText16Fallback, XAAImageGlyphBltFallback,
+ XAAPolyGlyphBltFallback, XAAPushPixelsFallback,
+};
+
+GCOps *XAAGetFallbackOps(void)
+{
+ return &XAAFallbackOps;
+}
diff --git a/xorg-server/hw/xfree86/xaa/xaaGC.c b/xorg-server/hw/xfree86/xaa/xaaGC.c
index 4bd3750cb..f9c1070f9 100644
--- a/xorg-server/hw/xfree86/xaa/xaaGC.c
+++ b/xorg-server/hw/xfree86/xaa/xaaGC.c
@@ -48,11 +48,6 @@ XAACreateGC(GCPtr pGC)
pGCPriv->wrapOps = NULL;
pGCPriv->wrapFuncs = pGC->funcs;
pGCPriv->XAAOps = &XAAFallbackOps;
- pGCPriv->flags = 0;
- pGCPriv->DashLength = 0;
- pGCPriv->DashPattern = NULL;
- pGCPriv->changes = 0;
- /* initialize any other private fields here */
pGC->funcs = &XAAGCFuncs;
}
@@ -651,5 +646,4 @@ GCOps XAAPixmapOps = {
XAAPolyText16Pixmap, XAAImageText8Pixmap,
XAAImageText16Pixmap, XAAImageGlyphBltPixmap,
XAAPolyGlyphBltPixmap, XAAPushPixelsPixmap,
- {NULL} /* devPrivate */
};
diff --git a/xorg-server/hw/xfree86/xaa/xaaWrapper.c b/xorg-server/hw/xfree86/xaa/xaaWrapper.c
deleted file mode 100644
index 09644c9ac..000000000
--- a/xorg-server/hw/xfree86/xaa/xaaWrapper.c
+++ /dev/null
@@ -1,477 +0,0 @@
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "scrnintstr.h"
-#include "gcstruct.h"
-#include "glyphstr.h"
-#include "window.h"
-#include "windowstr.h"
-#include "picture.h"
-#include "picturestr.h"
-#include "colormapst.h"
-#include "xaa.h"
-#include "xaalocal.h"
-#include "xaaWrapper.h"
-
-void XAASync(ScreenPtr pScreen);
-
-/* #include "render.h" */
-
-#if 1
-#define COND(pDraw) \
- ((pDraw)->depth \
- != (xaaWrapperGetScrPriv(((DrawablePtr)(pDraw))->pScreen))->depth)
-#else
-#define COND(pDraw) 1
-#endif
-
-static Bool xaaWrapperCreateGC(GCPtr pGC);
-static void xaaWrapperValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDraw);
-static void xaaWrapperDestroyGC(GCPtr pGC);
-static void xaaWrapperChangeGC (GCPtr pGC, unsigned long mask);
-static void xaaWrapperCopyGC (GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst);
-static void xaaWrapperChangeClip (GCPtr pGC, int type, pointer pvalue, int nrects);
-
-static void xaaWrapperCopyClip(GCPtr pgcDst, GCPtr pgcSrc);
-static void xaaWrapperDestroyClip(GCPtr pGC);
-
-
-static void
-xaaWrapperComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
- INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
- INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
-static void
-xaaWrapperGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
- PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist,
- GlyphListPtr list, GlyphPtr *glyphs);
-
-
-typedef struct {
- CloseScreenProcPtr CloseScreen;
- CreateScreenResourcesProcPtr CreateScreenResources;
- CreateWindowProcPtr CreateWindow;
- CopyWindowProcPtr CopyWindow;
- WindowExposuresProcPtr WindowExposures;
- CreateGCProcPtr CreateGC;
- CreateColormapProcPtr CreateColormap;
- DestroyColormapProcPtr DestroyColormap;
- InstallColormapProcPtr InstallColormap;
- UninstallColormapProcPtr UninstallColormap;
- ListInstalledColormapsProcPtr ListInstalledColormaps;
- StoreColorsProcPtr StoreColors;
- CompositeProcPtr Composite;
- GlyphsProcPtr Glyphs;
-
- CloseScreenProcPtr wrapCloseScreen;
- CreateScreenResourcesProcPtr wrapCreateScreenResources;
- CreateWindowProcPtr wrapCreateWindow;
- CopyWindowProcPtr wrapCopyWindow;
- WindowExposuresProcPtr wrapWindowExposures;
- CreateGCProcPtr wrapCreateGC;
- CreateColormapProcPtr wrapCreateColormap;
- DestroyColormapProcPtr wrapDestroyColormap;
- InstallColormapProcPtr wrapInstallColormap;
- UninstallColormapProcPtr wrapUninstallColormap;
- ListInstalledColormapsProcPtr wrapListInstalledColormaps;
- StoreColorsProcPtr wrapStoreColors;
- CompositeProcPtr wrapComposite;
- GlyphsProcPtr wrapGlyphs;
- int depth;
-} xaaWrapperScrPrivRec, *xaaWrapperScrPrivPtr;
-
-#define xaaWrapperGetScrPriv(s) ((xaaWrapperScrPrivPtr) \
- dixLookupPrivate(&(s)->devPrivates, xaaWrapperScrPrivateKey))
-#define xaaWrapperScrPriv(s) xaaWrapperScrPrivPtr pScrPriv = xaaWrapperGetScrPriv(s)
-
-#define wrap(priv,real,mem,func) {\
- priv->mem = real->mem; \
- real->mem = func; \
-}
-
-#define unwrap(priv,real,mem) {\
- real->mem = priv->mem; \
-}
-
-#define cond_wrap(priv,cond,real,mem,wrapmem,func) {\
- if (COND(cond)) \
- priv->wrapmem = real->mem; \
- else \
- priv->mem = real->mem; \
- real->mem = func; \
-}
-
-#define cond_unwrap(priv,cond,real,mem,wrapmem) {\
- if (COND(cond)) \
- real->mem = priv->wrapmem; \
- else \
- real->mem = priv->mem; \
-}
-
-#define get(priv,real,func,wrap) \
- priv->wrap = real->func;
-
-typedef struct _xaaWrapperGCPriv {
- GCOps *ops;
- Bool wrap;
- GCFuncs *funcs;
- GCOps *wrapops;
-} xaaWrapperGCPrivRec, *xaaWrapperGCPrivPtr;
-
-#define xaaWrapperGetGCPriv(pGC) ((xaaWrapperGCPrivPtr) \
- dixLookupPrivate(&(pGC)->devPrivates, xaaWrapperGCPrivateKey))
-#define xaaWrapperGCPriv(pGC) xaaWrapperGCPrivPtr pGCPriv = xaaWrapperGetGCPriv(pGC)
-
-
-static DevPrivateKeyRec xaaWrapperScrPrivateKeyRec;
-#define xaaWrapperScrPrivateKey (&xaaWrapperScrPrivateKeyRec)
-static DevPrivateKeyRec xaaWrapperGCPrivateKeyRec;
-#define xaaWrapperGCPrivateKey (&xaaWrapperGCPrivateKeyRec)
-
-static Bool
-xaaWrapperCreateScreenResources(ScreenPtr pScreen)
-{
- xaaWrapperScrPriv(pScreen);
- Bool ret;
-
- unwrap (pScrPriv,pScreen, CreateScreenResources);
- ret = pScreen->CreateScreenResources(pScreen);
- wrap(pScrPriv,pScreen,CreateScreenResources,xaaWrapperCreateScreenResources);
- return ret;
-}
-
-static Bool
-xaaWrapperCloseScreen (int iScreen, ScreenPtr pScreen)
-{
- xaaWrapperScrPriv(pScreen);
- Bool ret;
-
- unwrap (pScrPriv,pScreen, CloseScreen);
- ret = pScreen->CloseScreen(iScreen,pScreen);
- return TRUE;
-}
-
-static Bool
-xaaWrapperCreateWindow(WindowPtr pWin)
-{
- xaaWrapperScrPriv(pWin->drawable.pScreen);
- Bool ret;
-
- cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
- CreateWindow, wrapCreateWindow);
- ret = pWin->drawable.pScreen->CreateWindow(pWin);
- cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen, CreateWindow,
- wrapCreateWindow, xaaWrapperCreateWindow);
-
- return ret;
-}
-
-static void
-xaaWrapperCopyWindow(WindowPtr pWin,
- DDXPointRec ptOldOrg,
- RegionPtr prgnSrc)
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
- xaaWrapperScrPriv(pScreen);
-
- unwrap (pScrPriv, pScreen, CopyWindow);
-#if 0
- if (COND(&pWin->drawable))
- pWin->drawable.pScreen->CopyWindow = pScrPriv->wrapCopyWindow;
-#endif
- pScreen->CopyWindow(pWin, ptOldOrg, prgnSrc);
- wrap(pScrPriv, pScreen, CopyWindow, xaaWrapperCopyWindow);
-}
-
-static void
-xaaWrapperWindowExposures (WindowPtr pWin,
- RegionPtr prgn,
- RegionPtr other_exposed)
-{
- xaaWrapperScrPriv(pWin->drawable.pScreen);
-
- cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
- WindowExposures, wrapWindowExposures);
- pWin->drawable.pScreen->WindowExposures(pWin, prgn, other_exposed);
- cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
- WindowExposures, wrapWindowExposures, xaaWrapperWindowExposures);
-}
-
-static Bool
-xaaWrapperCreateColormap(ColormapPtr pmap)
-{
- xaaWrapperScrPriv(pmap->pScreen);
- Bool ret;
- unwrap(pScrPriv,pmap->pScreen, CreateColormap);
- ret = pmap->pScreen->CreateColormap(pmap);
- wrap(pScrPriv,pmap->pScreen,CreateColormap,xaaWrapperCreateColormap);
-
- return ret;
-}
-
-static void
-xaaWrapperDestroyColormap(ColormapPtr pmap)
-{
- xaaWrapperScrPriv(pmap->pScreen);
- unwrap(pScrPriv,pmap->pScreen, DestroyColormap);
- pmap->pScreen->DestroyColormap(pmap);
- wrap(pScrPriv,pmap->pScreen,DestroyColormap,xaaWrapperDestroyColormap);
-}
-
-static void
-xaaWrapperStoreColors(ColormapPtr pmap, int nColors, xColorItem *pColors)
-{
- xaaWrapperScrPriv(pmap->pScreen);
- unwrap(pScrPriv,pmap->pScreen, StoreColors);
- pmap->pScreen->StoreColors(pmap,nColors,pColors);
- wrap(pScrPriv,pmap->pScreen,StoreColors,xaaWrapperStoreColors);
-}
-
-static void
-xaaWrapperInstallColormap(ColormapPtr pmap)
-{
- xaaWrapperScrPriv(pmap->pScreen);
-
- unwrap(pScrPriv,pmap->pScreen, InstallColormap);
- pmap->pScreen->InstallColormap(pmap);
- wrap(pScrPriv,pmap->pScreen,InstallColormap,xaaWrapperInstallColormap);
-}
-
-static void
-xaaWrapperUninstallColormap(ColormapPtr pmap)
-{
- xaaWrapperScrPriv(pmap->pScreen);
-
- unwrap(pScrPriv,pmap->pScreen, UninstallColormap);
- pmap->pScreen->UninstallColormap(pmap);
- wrap(pScrPriv,pmap->pScreen,UninstallColormap,xaaWrapperUninstallColormap);
-}
-
-static int
-xaaWrapperListInstalledColormaps(ScreenPtr pScreen, Colormap *pCmapIds)
-{
- int n;
- xaaWrapperScrPriv(pScreen);
-
- unwrap(pScrPriv,pScreen, ListInstalledColormaps);
- n = pScreen->ListInstalledColormaps(pScreen, pCmapIds);
- wrap (pScrPriv,pScreen,ListInstalledColormaps,xaaWrapperListInstalledColormaps);
- return n;
-}
-
-Bool
-xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *func)
-{
- Bool ret;
- xaaWrapperScrPrivPtr pScrPriv;
- PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
-
- if (!dixRegisterPrivateKey(&xaaWrapperGCPrivateKeyRec, PRIVATE_GC, sizeof(xaaWrapperGCPrivRec)))
- return FALSE;
-
- if (!dixRegisterPrivateKey(&xaaWrapperScrPrivateKeyRec, PRIVATE_SCREEN, 0))
- return FALSE;
-
- pScrPriv = (xaaWrapperScrPrivPtr) malloc(sizeof (xaaWrapperScrPrivRec));
- if (!pScrPriv)
- return FALSE;
-
- get (pScrPriv, pScreen, CloseScreen, wrapCloseScreen);
- get (pScrPriv, pScreen, CreateScreenResources, wrapCreateScreenResources);
- get (pScrPriv, pScreen, CreateWindow, wrapCreateWindow);
- get (pScrPriv, pScreen, CopyWindow, wrapCopyWindow);
- get (pScrPriv, pScreen, WindowExposures, wrapWindowExposures);
- get (pScrPriv, pScreen, CreateGC, wrapCreateGC);
- get (pScrPriv, pScreen, CreateColormap, wrapCreateColormap);
- get (pScrPriv, pScreen, DestroyColormap, wrapDestroyColormap);
- get (pScrPriv, pScreen, InstallColormap, wrapInstallColormap);
- get (pScrPriv, pScreen, UninstallColormap, wrapUninstallColormap);
- get (pScrPriv, pScreen, ListInstalledColormaps, wrapListInstalledColormaps);
- get (pScrPriv, pScreen, StoreColors, wrapStoreColors);
- if (ps) {
- get (pScrPriv, ps, Glyphs, wrapGlyphs);
- get (pScrPriv, ps, Composite, wrapComposite);
- }
- if (!(ret = XAAInit(pScreen,infoPtr)))
- return FALSE;
-
- wrap (pScrPriv, pScreen, CloseScreen, xaaWrapperCloseScreen);
- wrap (pScrPriv, pScreen, CreateScreenResources,
- xaaWrapperCreateScreenResources);
- wrap (pScrPriv, pScreen, CreateWindow, xaaWrapperCreateWindow);
- wrap (pScrPriv, pScreen, CopyWindow, xaaWrapperCopyWindow);
- wrap (pScrPriv, pScreen, WindowExposures, xaaWrapperWindowExposures);
- wrap (pScrPriv, pScreen, CreateGC, xaaWrapperCreateGC);
- wrap (pScrPriv, pScreen, CreateColormap, xaaWrapperCreateColormap);
- wrap (pScrPriv, pScreen, DestroyColormap, xaaWrapperDestroyColormap);
- wrap (pScrPriv, pScreen, InstallColormap, xaaWrapperInstallColormap);
- wrap (pScrPriv, pScreen, UninstallColormap, xaaWrapperUninstallColormap);
- wrap (pScrPriv, pScreen, ListInstalledColormaps,
- xaaWrapperListInstalledColormaps);
- wrap (pScrPriv, pScreen, StoreColors, xaaWrapperStoreColors);
-
- if (ps) {
- wrap (pScrPriv, ps, Glyphs, xaaWrapperGlyphs);
- wrap (pScrPriv, ps, Composite, xaaWrapperComposite);
- }
- pScrPriv->depth = depth;
- dixSetPrivate(&pScreen->devPrivates, xaaWrapperScrPrivateKey, pScrPriv);
-
- *func = XAASync;
-
- return ret;
-}
-
-GCFuncs xaaWrapperGCFuncs = {
- xaaWrapperValidateGC, xaaWrapperChangeGC, xaaWrapperCopyGC,
- xaaWrapperDestroyGC, xaaWrapperChangeClip, xaaWrapperDestroyClip,
- xaaWrapperCopyClip
-};
-
-#define XAAWRAPPER_GC_FUNC_PROLOGUE(pGC) \
- xaaWrapperGCPriv(pGC); \
- unwrap(pGCPriv, pGC, funcs); \
- if (pGCPriv->wrap) unwrap(pGCPriv, pGC, ops)
-
-#define XAAWRAPPER_GC_FUNC_EPILOGUE(pGC) \
- wrap(pGCPriv, pGC, funcs, &xaaWrapperGCFuncs); \
- if (pGCPriv->wrap) wrap(pGCPriv, pGC, ops, pGCPriv->wrapops)
-
-static Bool
-xaaWrapperCreateGC(GCPtr pGC)
-{
- ScreenPtr pScreen = pGC->pScreen;
- xaaWrapperScrPriv(pScreen);
- xaaWrapperGCPriv(pGC);
- Bool ret;
-
- unwrap (pScrPriv, pScreen, CreateGC);
- if((ret = (*pScreen->CreateGC) (pGC))) {
- pGCPriv->wrap = FALSE;
- pGCPriv->funcs = pGC->funcs;
- pGCPriv->wrapops = pGC->ops;
- pGC->funcs = &xaaWrapperGCFuncs;
- }
- wrap (pScrPriv, pScreen, CreateGC, xaaWrapperCreateGC);
-
- return ret;
-}
-
-static void
-xaaWrapperValidateGC(
- GCPtr pGC,
- unsigned long changes,
- DrawablePtr pDraw
-){
- XAAWRAPPER_GC_FUNC_PROLOGUE (pGC);
- (*pGC->funcs->ValidateGC)(pGC, changes, pDraw);
-
- if(COND(pDraw))
- pGCPriv->wrap = TRUE;
-
- XAAWRAPPER_GC_FUNC_EPILOGUE (pGC);
-}
-
-static void
-xaaWrapperDestroyGC(GCPtr pGC)
-{
- XAAWRAPPER_GC_FUNC_PROLOGUE (pGC);
- (*pGC->funcs->DestroyGC)(pGC);
- XAAWRAPPER_GC_FUNC_EPILOGUE (pGC);
-}
-
-static void
-xaaWrapperChangeGC (
- GCPtr pGC,
- unsigned long mask
-){
- XAAWRAPPER_GC_FUNC_PROLOGUE (pGC);
- (*pGC->funcs->ChangeGC) (pGC, mask);
- XAAWRAPPER_GC_FUNC_EPILOGUE (pGC);
-}
-
-static void
-xaaWrapperCopyGC (
- GCPtr pGCSrc,
- unsigned long mask,
- GCPtr pGCDst
-){
- XAAWRAPPER_GC_FUNC_PROLOGUE (pGCDst);
- (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst);
- XAAWRAPPER_GC_FUNC_EPILOGUE (pGCDst);
-}
-
-static void
-xaaWrapperChangeClip (
- GCPtr pGC,
- int type,
- pointer pvalue,
- int nrects
-){
- XAAWRAPPER_GC_FUNC_PROLOGUE (pGC);
- (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
- XAAWRAPPER_GC_FUNC_EPILOGUE (pGC);
-}
-
-static void
-xaaWrapperCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
-{
- XAAWRAPPER_GC_FUNC_PROLOGUE (pgcDst);
- (* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc);
- XAAWRAPPER_GC_FUNC_EPILOGUE (pgcDst);
-}
-
-static void
-xaaWrapperDestroyClip(GCPtr pGC)
-{
- XAAWRAPPER_GC_FUNC_PROLOGUE (pGC);
- (* pGC->funcs->DestroyClip)(pGC);
- XAAWRAPPER_GC_FUNC_EPILOGUE (pGC);
-}
-
-static void
-xaaWrapperComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
- INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
- INT16 xDst, INT16 yDst, CARD16 width, CARD16 height)
-{
- ScreenPtr pScreen = pDst->pDrawable->pScreen;
- PictureScreenPtr ps = GetPictureScreen(pScreen);
- xaaWrapperScrPriv(pScreen);
-
- unwrap (pScrPriv, ps, Composite);
- (*ps->Composite) (op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask,
- xDst, yDst, width, height);
- wrap (pScrPriv, ps, Composite, xaaWrapperComposite);
-}
-
-
-static void
-xaaWrapperGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
- PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist,
- GlyphListPtr list, GlyphPtr *glyphs)
-{
- ScreenPtr pScreen = pDst->pDrawable->pScreen;
- PictureScreenPtr ps = GetPictureScreen(pScreen);
- xaaWrapperScrPriv(pScreen);
-
- unwrap (pScrPriv, ps, Glyphs);
- (*ps->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc,
- nlist, list, glyphs);
- wrap (pScrPriv, ps, Glyphs, xaaWrapperGlyphs);
-
-}
-
-void
-XAASync(ScreenPtr pScreen)
-{
- XAAScreenPtr pScreenPriv = (XAAScreenPtr)
- dixLookupPrivate(&pScreen->devPrivates, XAAGetScreenKey());
- XAAInfoRecPtr infoRec = pScreenPriv->AccelInfoRec;
-
- if(infoRec->NeedToSync) {
- (*infoRec->Sync)(infoRec->pScrn);
- infoRec->NeedToSync = FALSE;
- }
-}
diff --git a/xorg-server/hw/xfree86/xaa/xaaWrapper.h b/xorg-server/hw/xfree86/xaa/xaaWrapper.h
deleted file mode 100644
index f554741c6..000000000
--- a/xorg-server/hw/xfree86/xaa/xaaWrapper.h
+++ /dev/null
@@ -1,10 +0,0 @@
-
-#ifndef _XAA_WRAPPER_H
-# define _XAA_WRAPPER_H
-
-typedef void (*SyncFunc)(ScreenPtr);
-
-extern _X_EXPORT Bool xaaSetupWrapper(ScreenPtr pScreen,
- XAAInfoRecPtr infoPtr, int depth, SyncFunc *func);
-
-#endif