summaryrefslogtreecommitdiffstats
path: root/xorg
diff options
context:
space:
mode:
Diffstat (limited to 'xorg')
-rw-r--r--xorg/server/module/Makefile6
-rw-r--r--xorg/server/module/rdp.h69
-rw-r--r--xorg/server/module/rdpCopyArea.c55
-rw-r--r--xorg/server/module/rdpCopyArea.h29
-rw-r--r--xorg/server/module/rdpCopyPlane.c59
-rw-r--r--xorg/server/module/rdpCopyPlane.h (renamed from xorg/server/module/rdpMain.c)21
-rw-r--r--xorg/server/module/rdpDraw.c117
-rw-r--r--xorg/server/module/rdpDraw.h66
-rw-r--r--xorg/server/module/rdpFillPolygon.c52
-rw-r--r--xorg/server/module/rdpFillPolygon.h30
-rw-r--r--xorg/server/module/rdpFillSpans.c52
-rw-r--r--xorg/server/module/rdpFillSpans.h29
-rw-r--r--xorg/server/module/rdpGC.c235
-rw-r--r--xorg/server/module/rdpGC.h30
-rw-r--r--xorg/server/module/rdpImageGlyphBlt.c52
-rw-r--r--xorg/server/module/rdpImageGlyphBlt.h30
-rw-r--r--xorg/server/module/rdpImageText16.c50
-rw-r--r--xorg/server/module/rdpImageText16.h29
-rw-r--r--xorg/server/module/rdpImageText8.c51
-rw-r--r--xorg/server/module/rdpImageText8.h29
-rw-r--r--xorg/server/module/rdpPolyArc.c48
-rw-r--r--xorg/server/module/rdpPolyArc.h28
-rw-r--r--xorg/server/module/rdpPolyFillArc.c48
-rw-r--r--xorg/server/module/rdpPolyFillArc.h28
-rw-r--r--xorg/server/module/rdpPolyFillRect.c50
-rw-r--r--xorg/server/module/rdpPolyFillRect.h29
-rw-r--r--xorg/server/module/rdpPolyGlyphBlt.c52
-rw-r--r--xorg/server/module/rdpPolyGlyphBlt.h30
-rw-r--r--xorg/server/module/rdpPolyPoint.c50
-rw-r--r--xorg/server/module/rdpPolyPoint.h29
-rw-r--r--xorg/server/module/rdpPolyRectangle.c51
-rw-r--r--xorg/server/module/rdpPolyRectangle.h29
-rw-r--r--xorg/server/module/rdpPolySegment.c48
-rw-r--r--xorg/server/module/rdpPolySegment.h28
-rw-r--r--xorg/server/module/rdpPolyText16.c55
-rw-r--r--xorg/server/module/rdpPolyText16.h29
-rw-r--r--xorg/server/module/rdpPolyText8.c55
-rw-r--r--xorg/server/module/rdpPolyText8.h29
-rw-r--r--xorg/server/module/rdpPolylines.c50
-rw-r--r--xorg/server/module/rdpPolylines.h29
-rw-r--r--xorg/server/module/rdpPri.c89
-rw-r--r--xorg/server/module/rdpPri.h47
-rw-r--r--xorg/server/module/rdpPushPixels.c50
-rw-r--r--xorg/server/module/rdpPushPixels.h29
-rw-r--r--xorg/server/module/rdpPutImage.c51
-rw-r--r--xorg/server/module/rdpPutImage.h29
-rw-r--r--xorg/server/module/rdpSetSpans.c52
-rw-r--r--xorg/server/module/rdpSetSpans.h29
48 files changed, 2247 insertions, 15 deletions
diff --git a/xorg/server/module/Makefile b/xorg/server/module/Makefile
index 39bfbbed..cb2439fa 100644
--- a/xorg/server/module/Makefile
+++ b/xorg/server/module/Makefile
@@ -1,5 +1,9 @@
-OBJS = rdpMain.o
+OBJS = rdpDraw.o rdpPri.o rdpGC.o rdpFillSpans.o rdpSetSpans.o rdpPutImage.o \
+rdpCopyArea.o rdpCopyPlane.o rdpPolyPoint.o rdpPolylines.o rdpPolySegment.o \
+rdpPolyRectangle.o rdpPolyArc.o rdpFillPolygon.o rdpPolyFillRect.o \
+rdpPolyFillArc.o rdpPolyText8.o rdpPolyText16.o rdpImageText8.o \
+rdpImageText16.o rdpImageGlyphBlt.o rdpPolyGlyphBlt.o rdpPushPixels.o
CFLAGS = -O2 -Wall -I/usr/include/xorg -I/usr/include/pixman-1
diff --git a/xorg/server/module/rdp.h b/xorg/server/module/rdp.h
new file mode 100644
index 00000000..c812e251
--- /dev/null
+++ b/xorg/server/module/rdp.h
@@ -0,0 +1,69 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef _RDP_H
+#define _RDP_H
+
+#include <xorg-server.h>
+#include <scrnintstr.h>
+#include <gcstruct.h>
+
+#include "rdpPri.h"
+
+/* move this to common header */
+struct _rdpRec
+{
+ char data[1024];
+ int width;
+ int height;
+ int num_modes;
+ char *ptr;
+ ScreenPtr pScreen;
+ rdpDevPrivateKey privateKeyRecGC;
+ rdpDevPrivateKey privateKeyRecPixmap;
+
+ CopyWindowProcPtr CopyWindow;
+ CreateGCProcPtr CreateGC;
+ CreatePixmapProcPtr CreatePixmap;
+ DestroyPixmapProcPtr DestroyPixmap;
+ ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
+
+};
+typedef struct _rdpRec rdpRec;
+typedef struct _rdpRec * rdpPtr;
+#define XRDPPTR(_p) ((rdpPtr)((_p)->driverPrivate))
+
+struct _rdpGCRec
+{
+ GCFuncs *funcs;
+ GCOps *ops;
+};
+typedef struct _rdpGCRec rdpGCRec;
+typedef struct _rdpGCRec * rdpGCPtr;
+
+struct _rdpPixmapRec
+{
+ int i1;
+};
+typedef struct _rdpPixmapRec rdpPixmapRec;
+typedef struct _rdpPixmapRec * rdpPixmapPtr;
+
+#endif
diff --git a/xorg/server/module/rdpCopyArea.c b/xorg/server/module/rdpCopyArea.c
new file mode 100644
index 00000000..dd32644e
--- /dev/null
+++ b/xorg/server/module/rdpCopyArea.c
@@ -0,0 +1,55 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+static RegionPtr
+rdpCopyAreaOrg(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
+ int srcx, int srcy, int w, int h, int dstx, int dsty)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+ RegionPtr rv;
+
+ GC_OP_PROLOGUE(pGC);
+ rv = pGC->ops->CopyArea(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty);
+ GC_OP_EPILOGUE(pGC);
+ return rv;
+}
+
+/******************************************************************************/
+RegionPtr
+rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
+ int srcx, int srcy, int w, int h, int dstx, int dsty)
+{
+ RegionPtr rv;
+
+ LLOGLN(10, ("rdpCopyArea:"));
+ /* do original call */
+ rv = rdpCopyAreaOrg(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty);
+ return rv;
+}
diff --git a/xorg/server/module/rdpCopyArea.h b/xorg/server/module/rdpCopyArea.h
new file mode 100644
index 00000000..654b6edc
--- /dev/null
+++ b/xorg/server/module/rdpCopyArea.h
@@ -0,0 +1,29 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPCOPYAREA_H
+#define __RDPCOPYAREA_H
+
+RegionPtr
+rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
+ int srcx, int srcy, int w, int h, int dstx, int dsty);
+
+#endif
diff --git a/xorg/server/module/rdpCopyPlane.c b/xorg/server/module/rdpCopyPlane.c
new file mode 100644
index 00000000..64b8a1ea
--- /dev/null
+++ b/xorg/server/module/rdpCopyPlane.c
@@ -0,0 +1,59 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+RegionPtr
+rdpCopyPlaneOrg(DrawablePtr pSrc, DrawablePtr pDst,
+ GCPtr pGC, int srcx, int srcy, int w, int h,
+ int dstx, int dsty, unsigned long bitPlane)
+{
+ RegionPtr rv;
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ rv = pGC->ops->CopyPlane(pSrc, pDst, pGC, srcx, srcy,
+ w, h, dstx, dsty, bitPlane);
+ GC_OP_EPILOGUE(pGC);
+ return rv;
+}
+
+/******************************************************************************/
+RegionPtr
+rdpCopyPlane(DrawablePtr pSrc, DrawablePtr pDst,
+ GCPtr pGC, int srcx, int srcy, int w, int h,
+ int dstx, int dsty, unsigned long bitPlane)
+{
+ RegionPtr rv;
+
+ LLOGLN(10, ("rdpCopyPlane:"));
+ /* do original call */
+ rv = rdpCopyPlaneOrg(pSrc, pDst, pGC, srcx, srcy, w, h,
+ dstx, dsty, bitPlane);
+ return rv;
+}
diff --git a/xorg/server/module/rdpMain.c b/xorg/server/module/rdpCopyPlane.h
index 5f3ab8c2..85a79e76 100644
--- a/xorg/server/module/rdpMain.c
+++ b/xorg/server/module/rdpCopyPlane.h
@@ -17,21 +17,14 @@ OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-This is the main modules file
-
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* this should be before all X11 .h files */
-#include <xorg-server.h>
-
-/* all driver need this */
-#include <xf86.h>
-#include <xf86_OSproc.h>
-#include <mipointer.h>
+#ifndef __RDPCOPYPLANE_H
+#define __RDPCOPYPLANE_H
-#include <xorg-server.h>
+RegionPtr
+rdpCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
+ GCPtr pGC, int srcx, int srcy, int width, int height,
+ int dstx, int dsty, unsigned long bitPlane);
+#endif
diff --git a/xorg/server/module/rdpDraw.c b/xorg/server/module/rdpDraw.c
new file mode 100644
index 00000000..0018fdf6
--- /dev/null
+++ b/xorg/server/module/rdpDraw.c
@@ -0,0 +1,117 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+misc draw calls
+
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* this should be before all X11 .h files */
+#include <xorg-server.h>
+
+/* all driver need this */
+#include <xf86.h>
+#include <xf86_OSproc.h>
+
+#include <mipointer.h>
+#include <fb.h>
+#include <micmap.h>
+#include <mi.h>
+
+#include "rdp.h"
+
+/******************************************************************************/
+#define LLOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/*****************************************************************************/
+PixmapPtr
+rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
+ unsigned usage_hint)
+{
+ ScrnInfoPtr pScrn;
+ rdpPtr dev;
+ PixmapPtr rv;
+
+ pScrn = xf86Screens[pScreen->myNum];
+ dev = XRDPPTR(pScrn);
+ pScreen->CreatePixmap = dev->CreatePixmap;
+ rv = pScreen->CreatePixmap(pScreen, 0, 0, 0, 0);
+ pScreen->CreatePixmap = XVivCreatePixmap;
+ return rv;
+}
+
+/******************************************************************************/
+Bool
+rdpDestroyPixmap(PixmapPtr pPixmap)
+{
+ Bool rv;
+ ScreenPtr pScreen;
+ rdpPtr dev;
+ ScrnInfoPtr pScrn;
+
+ LLOGLN(10, ("rdpDestroyPixmap: refcnt %d", pPixmap->refcnt));
+ pScreen = pPixmap->drawable.pScreen;
+ pScrn = xf86Screens[pScreen->myNum];
+ dev = XRDPPTR(pScrn);
+ pScreen->DestroyPixmap = dev->DestroyPixmap;
+ rv = pScreen->DestroyPixmap(pPixmap);
+ pScreen->DestroyPixmap = XVivDestroyPixmap;
+ return rv;
+}
+
+/******************************************************************************/
+Bool
+rdpModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth,
+ int bitsPerPixel, int devKind, pointer pPixData)
+{
+ Bool rv;
+ ScreenPtr pScreen;
+ rdpPtr dev;
+ ScrnInfoPtr pScrn;
+
+ pScreen = pPixmap->drawable.pScreen;
+ pScrn = xf86Screens[pScreen->myNum];
+ dev = XRDPPTR(pScrn);
+ pScreen->ModifyPixmapHeader = dev->ModifyPixmapHeader;
+ rv = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel,
+ devKind, pPixData);
+ pScreen->ModifyPixmapHeader = rdpModifyPixmapHeader;
+ return rv;
+}
+
+/*****************************************************************************/
+void
+rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion)
+{
+ ScrnInfoPtr pScrn;
+ ScreenPtr pScreen;
+ rdpPtr dev;
+
+ pScreen = pWin->drawable.pScreen;
+ pScrn = xf86Screens[pScreen->myNum];
+ dev = XRDPPTR(pScrn);
+ dev->pScreen->CopyWindow = dev->CopyWindow;
+ dev->pScreen->CopyWindow(pWin, ptOldOrg, pOldRegion);
+ dev->pScreen->CopyWindow = rdpCopyWindow;
+}
diff --git a/xorg/server/module/rdpDraw.h b/xorg/server/module/rdpDraw.h
new file mode 100644
index 00000000..e0e3988e
--- /dev/null
+++ b/xorg/server/module/rdpDraw.h
@@ -0,0 +1,66 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+misc draw calls
+
+*/
+
+#ifndef __RDPDRAW_H
+#define __RDPDRAW_H
+
+#include <xorg-server.h>
+#include <xf86.h>
+
+/******************************************************************************/
+#define GC_OP_PROLOGUE(_pGC) \
+do { \
+ rdpPtr dev; \
+ ScreenPtr pScreen; \
+ ScrnInfoPtr pScrn; \
+ pScreen = (_pGC)->pScreen; \
+ pScrn = xf86Screens[pScreen->myNum]; \
+ dev = XRDPPTR(pScrn); \
+ priv = (rdpGCPtr)rdpGetGCPrivate(_pGC, dev->privateKeyRecGC); \
+ oldFuncs = (_pGC)->funcs; \
+ (_pGC)->funcs = priv->funcs; \
+ (_pGC)->ops = priv->ops; \
+} while (0)
+
+/******************************************************************************/
+#define GC_OP_EPILOGUE(_pGC) \
+do { \
+ priv->ops = (_pGC)->ops; \
+ (_pGC)->funcs = oldFuncs; \
+ (_pGC)->ops = &g_rdpGCOps; \
+} while (0)
+
+extern GCOps g_rdpGCOps; /* in rdpGC.c */
+
+PixmapPtr
+rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
+ unsigned usage_hint);
+Bool
+rdpDestroyPixmap(PixmapPtr pPixmap);
+Bool
+rdpModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth,
+ int bitsPerPixel, int devKind, pointer pPixData);
+void
+rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion);
+
+#endif
diff --git a/xorg/server/module/rdpFillPolygon.c b/xorg/server/module/rdpFillPolygon.c
new file mode 100644
index 00000000..38043c0b
--- /dev/null
+++ b/xorg/server/module/rdpFillPolygon.c
@@ -0,0 +1,52 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+void
+rdpFillPolygonOrg(DrawablePtr pDrawable, GCPtr pGC,
+ int shape, int mode, int count,
+ DDXPointPtr pPts)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ pGC->ops->FillPolygon(pDrawable, pGC, shape, mode, count, pPts);
+ GC_OP_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+void
+rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC,
+ int shape, int mode, int count,
+ DDXPointPtr pPts)
+{
+ LLOGLN(10, ("rdpFillPolygon:"));
+ /* do original call */
+ rdpFillPolygonOrg(pDrawable, pGC, shape, mode, count, pPts);
+}
diff --git a/xorg/server/module/rdpFillPolygon.h b/xorg/server/module/rdpFillPolygon.h
new file mode 100644
index 00000000..89da9ae0
--- /dev/null
+++ b/xorg/server/module/rdpFillPolygon.h
@@ -0,0 +1,30 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPFILLPOLYGON_H
+#define __RDPFILLPOLYGON_H
+
+void
+rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC,
+ int shape, int mode, int count,
+ DDXPointPtr pPts);
+
+#endif
diff --git a/xorg/server/module/rdpFillSpans.c b/xorg/server/module/rdpFillSpans.c
new file mode 100644
index 00000000..dbd4cc1e
--- /dev/null
+++ b/xorg/server/module/rdpFillSpans.c
@@ -0,0 +1,52 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LDEBUG 0
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+static void
+rdpFillSpansOrg(DrawablePtr pDrawable, GCPtr pGC, int nInit,
+ DDXPointPtr pptInit, int *pwidthInit, int fSorted)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ pGC->ops->FillSpans(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted);
+ GC_OP_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+void
+rdpFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nInit,
+ DDXPointPtr pptInit, int *pwidthInit, int fSorted)
+{
+ LLOGLN(0, ("rdpFillSpans:"));
+ /* do original call */
+ rdpFillSpansOrg(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted);
+}
diff --git a/xorg/server/module/rdpFillSpans.h b/xorg/server/module/rdpFillSpans.h
new file mode 100644
index 00000000..7e014e6b
--- /dev/null
+++ b/xorg/server/module/rdpFillSpans.h
@@ -0,0 +1,29 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPFILLSPANS_H
+#define __RDPFILLSPANS_H
+
+void
+rdpFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nInit,
+ DDXPointPtr pptInit, int* pwidthInit, int fSorted);
+
+#endif
diff --git a/xorg/server/module/rdpGC.c b/xorg/server/module/rdpGC.c
new file mode 100644
index 00000000..a7fe9ff5
--- /dev/null
+++ b/xorg/server/module/rdpGC.c
@@ -0,0 +1,235 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+GC related calls
+
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* this should be before all X11 .h files */
+#include <xorg-server.h>
+
+/* all driver need this */
+#include <xf86.h>
+#include <xf86_OSproc.h>
+
+#include <mipointer.h>
+#include <fb.h>
+#include <micmap.h>
+#include <mi.h>
+
+#include "rdp.h"
+#include "rdpFillSpans.h"
+#include "rdpSetSpans.h"
+#include "rdpPutImage.h"
+#include "rdpCopyArea.h"
+#include "rdpCopyPlane.h"
+#include "rdpPolyPoint.h"
+#include "rdpPolylines.h"
+#include "rdpPolySegment.h"
+#include "rdpPolyRectangle.h"
+#include "rdpPolyArc.h"
+#include "rdpFillPolygon.h"
+#include "rdpPolyFillRect.h"
+#include "rdpPolyFillArc.h"
+#include "rdpPolyText8.h"
+#include "rdpPolyText16.h"
+#include "rdpImageText8.h"
+#include "rdpImageText16.h"
+#include "rdpImageGlyphBlt.h"
+#include "rdpPolyGlyphBlt.h"
+#include "rdpPushPixels.h"
+
+/******************************************************************************/
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+#define GC_FUNC_PROLOGUE(_pGC) \
+ do { \
+ rdpPtr dev; \
+ ScreenPtr pScreen; \
+ ScrnInfoPtr pScrn; \
+ pScreen = _pGC->pScreen; \
+ pScrn = xf86Screens[pScreen->myNum]; \
+ dev = XRDPPTR(pScrn); \
+ priv = (rdpGCPtr)rdpGetGCPrivate(_pGC, dev->privateKeyRecGC); \
+ (_pGC)->funcs = priv->funcs; \
+ if (priv->ops != 0) \
+ { \
+ (_pGC)->ops = priv->ops; \
+ } \
+ } while (0)
+
+/******************************************************************************/
+#define GC_FUNC_EPILOGUE(_pGC) \
+ do { \
+ priv->funcs = (_pGC)->funcs; \
+ (_pGC)->funcs = &g_rdpGCFuncs; \
+ if (priv->ops != 0) \
+ { \
+ priv->ops = (_pGC)->ops; \
+ (_pGC)->ops = &g_rdpGCOps; \
+ } \
+ } while (0)
+
+static void
+rdpValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr d);
+static void
+rdpChangeGC(GCPtr pGC, unsigned long mask);
+static void
+rdpCopyGC(GCPtr src, unsigned long mask, GCPtr dst);
+static void
+rdpDestroyGC(GCPtr pGC);
+static void
+rdpChangeClip(GCPtr pGC, int type, pointer pValue, int nrects);
+static void
+rdpDestroyClip(GCPtr pGC);
+static void
+rdpCopyClip(GCPtr dst, GCPtr src);
+
+GCFuncs g_rdpGCFuncs =
+{
+ rdpValidateGC, rdpChangeGC, rdpCopyGC, rdpDestroyGC, rdpChangeClip,
+ rdpDestroyClip, rdpCopyClip
+};
+
+GCOps g_rdpGCOps =
+{
+ rdpFillSpans, rdpSetSpans, rdpPutImage, rdpCopyArea, rdpCopyPlane,
+ rdpPolyPoint, rdpPolylines, rdpPolySegment, rdpPolyRectangle,
+ rdpPolyArc, rdpFillPolygon, rdpPolyFillRect, rdpPolyFillArc,
+ rdpPolyText8, rdpPolyText16, rdpImageText8, rdpImageText16,
+ rdpImageGlyphBlt, rdpPolyGlyphBlt, rdpPushPixels
+};
+
+/******************************************************************************/
+static void
+rdpValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr d)
+{
+ rdpGCRec *priv;
+
+ LLOGLN(10, ("rdpValidateGC:"));
+ GC_FUNC_PROLOGUE(pGC);
+ pGC->funcs->ValidateGC(pGC, changes, d);
+ GC_FUNC_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+static void
+rdpChangeGC(GCPtr pGC, unsigned long mask)
+{
+ rdpGCRec *priv;
+
+ LLOGLN(10, ("rdpChangeGC:"));
+ GC_FUNC_PROLOGUE(pGC);
+ pGC->funcs->ChangeGC(pGC, mask);
+ GC_FUNC_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+static void
+rdpCopyGC(GCPtr src, unsigned long mask, GCPtr dst)
+{
+ rdpGCRec *priv;
+
+ LLOGLN(10, ("rdpCopyGC:"));
+ GC_FUNC_PROLOGUE(dst);
+ dst->funcs->CopyGC(src, mask, dst);
+ GC_FUNC_EPILOGUE(dst);
+}
+
+/******************************************************************************/
+static void
+rdpDestroyGC(GCPtr pGC)
+{
+ rdpGCRec *priv;
+
+ LLOGLN(10, ("rdpDestroyGC:"));
+ GC_FUNC_PROLOGUE(pGC);
+ pGC->funcs->DestroyGC(pGC);
+ GC_FUNC_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+static void
+rdpChangeClip(GCPtr pGC, int type, pointer pValue, int nrects)
+{
+ rdpGCRec *priv;
+
+ LLOGLN(10, ("rdpChangeClip:"));
+ GC_FUNC_PROLOGUE(pGC);
+ pGC->funcs->ChangeClip(pGC, type, pValue, nrects);
+ GC_FUNC_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+static void
+rdpDestroyClip(GCPtr pGC)
+{
+ rdpGCRec *priv;
+
+ LLOGLN(10, ("rdpDestroyClip:"));
+ GC_FUNC_PROLOGUE(pGC);
+ pGC->funcs->DestroyClip(pGC);
+ GC_FUNC_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+static void
+rdpCopyClip(GCPtr dst, GCPtr src)
+{
+ rdpGCRec *priv;
+
+ LLOGLN(10, ("rdpCopyClip:"));
+ GC_FUNC_PROLOGUE(dst);
+ dst->funcs->CopyClip(dst, src);
+ GC_FUNC_EPILOGUE(dst);
+}
+
+/*****************************************************************************/
+Bool
+rdpCreateGC(GCPtr pGC)
+{
+ Bool rv;
+ rdpPtr dev;
+ ScreenPtr pScreen;
+ ScrnInfoPtr pScrn;
+ rdpGCPtr priv;
+
+ LLOGLN(10, ("rdpCreateGC:"));
+ pScreen = pGC->pScreen;
+ pScrn = xf86Screens[pScreen->myNum];
+ dev = XRDPPTR(pScrn);
+ priv = (rdpGCPtr)rdpGetGCPrivate(pGC, dev->privateKeyRecGC);
+ pScreen->CreateGC = dev->CreateGC;
+ rv = pScreen->CreateGC(pGC);
+ if (rv)
+ {
+ priv->funcs = pGC->funcs;
+ priv->ops = 0;
+ pGC->funcs = &g_rdpGCFuncs;
+ }
+ pScreen->CreateGC = rdpCreateGC;
+ return rv;
+}
diff --git a/xorg/server/module/rdpGC.h b/xorg/server/module/rdpGC.h
new file mode 100644
index 00000000..4ad129a2
--- /dev/null
+++ b/xorg/server/module/rdpGC.h
@@ -0,0 +1,30 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+GC related calls
+
+*/
+
+#ifndef _RDPGC_H
+#define _RDPGC_H
+
+Bool
+rdpCreateGC(GCPtr pGC);
+
+#endif
diff --git a/xorg/server/module/rdpImageGlyphBlt.c b/xorg/server/module/rdpImageGlyphBlt.c
new file mode 100644
index 00000000..0b0d7ce8
--- /dev/null
+++ b/xorg/server/module/rdpImageGlyphBlt.c
@@ -0,0 +1,52 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+void
+rdpImageGlyphBltOrg(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, unsigned int nglyph,
+ CharInfoPtr *ppci, pointer pglyphBase)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ pGC->ops->ImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
+ GC_OP_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+void
+rdpImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, unsigned int nglyph,
+ CharInfoPtr *ppci, pointer pglyphBase)
+{
+ LLOGLN(10, ("rdpImageGlyphBlt:"));
+ /* do original call */
+ rdpImageGlyphBltOrg(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
+}
diff --git a/xorg/server/module/rdpImageGlyphBlt.h b/xorg/server/module/rdpImageGlyphBlt.h
new file mode 100644
index 00000000..c5483c7e
--- /dev/null
+++ b/xorg/server/module/rdpImageGlyphBlt.h
@@ -0,0 +1,30 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPIMAGEGLYPHBLT_H
+#define __RDPIMAGEGLYPHBLT_H
+
+void
+rdpImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, unsigned int nglyph,
+ CharInfoPtr* ppci, pointer pglyphBase);
+
+#endif
diff --git a/xorg/server/module/rdpImageText16.c b/xorg/server/module/rdpImageText16.c
new file mode 100644
index 00000000..8ddd9bf3
--- /dev/null
+++ b/xorg/server/module/rdpImageText16.c
@@ -0,0 +1,50 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+void
+rdpImageText16Org(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, int count, unsigned short *chars)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ pGC->ops->ImageText16(pDrawable, pGC, x, y, count, chars);
+ GC_OP_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+void
+rdpImageText16(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, int count, unsigned short *chars)
+{
+ LLOGLN(10, ("rdpImageText16:"));
+ /* do original call */
+ rdpImageText16Org(pDrawable, pGC, x, y, count, chars);
+}
diff --git a/xorg/server/module/rdpImageText16.h b/xorg/server/module/rdpImageText16.h
new file mode 100644
index 00000000..0ffb90f2
--- /dev/null
+++ b/xorg/server/module/rdpImageText16.h
@@ -0,0 +1,29 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPIMAGETEXT16_H
+#define __RDPIMAGETEXT16_H
+
+void
+rdpImageText16(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, int count, unsigned short* chars);
+
+#endif
diff --git a/xorg/server/module/rdpImageText8.c b/xorg/server/module/rdpImageText8.c
new file mode 100644
index 00000000..ab41753b
--- /dev/null
+++ b/xorg/server/module/rdpImageText8.c
@@ -0,0 +1,51 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+void
+rdpImageText8Org(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, int count, char *chars)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ pGC->ops->ImageText8(pDrawable, pGC, x, y, count, chars);
+ GC_OP_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+void
+rdpImageText8(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, int count, char *chars)
+{
+ LLOGLN(10, ("rdpImageText8:"));
+ /* do original call */
+ rdpImageText8Org(pDrawable, pGC, x, y, count, chars);
+ return;
+}
diff --git a/xorg/server/module/rdpImageText8.h b/xorg/server/module/rdpImageText8.h
new file mode 100644
index 00000000..dc0c4ec5
--- /dev/null
+++ b/xorg/server/module/rdpImageText8.h
@@ -0,0 +1,29 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPIMAGETEXT8_H
+#define __RDPIMAGETEXT8_H
+
+void
+rdpImageText8(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, int count, char* chars);
+
+#endif
diff --git a/xorg/server/module/rdpPolyArc.c b/xorg/server/module/rdpPolyArc.c
new file mode 100644
index 00000000..63fc699b
--- /dev/null
+++ b/xorg/server/module/rdpPolyArc.c
@@ -0,0 +1,48 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+void
+rdpPolyArcOrg(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ pGC->ops->PolyArc(pDrawable, pGC, narcs, parcs);
+ GC_OP_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+void
+rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
+{
+ LLOGLN(10, ("rdpPolyArc:"));
+ /* do original call */
+ rdpPolyArcOrg(pDrawable, pGC, narcs, parcs);
+}
diff --git a/xorg/server/module/rdpPolyArc.h b/xorg/server/module/rdpPolyArc.h
new file mode 100644
index 00000000..7ebadc35
--- /dev/null
+++ b/xorg/server/module/rdpPolyArc.h
@@ -0,0 +1,28 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPPOLYARC_H
+#define __RDPPOLYARC_H
+
+void
+rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc* parcs);
+
+#endif
diff --git a/xorg/server/module/rdpPolyFillArc.c b/xorg/server/module/rdpPolyFillArc.c
new file mode 100644
index 00000000..b53a1131
--- /dev/null
+++ b/xorg/server/module/rdpPolyFillArc.c
@@ -0,0 +1,48 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+void
+rdpPolyFillArcOrg(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ pGC->ops->PolyFillArc(pDrawable, pGC, narcs, parcs);
+ GC_OP_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+void
+rdpPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
+{
+ LLOGLN(10, ("rdpPolyFillArc:"));
+ /* do original call */
+ rdpPolyFillArcOrg(pDrawable, pGC, narcs, parcs);
+}
diff --git a/xorg/server/module/rdpPolyFillArc.h b/xorg/server/module/rdpPolyFillArc.h
new file mode 100644
index 00000000..9a9846e1
--- /dev/null
+++ b/xorg/server/module/rdpPolyFillArc.h
@@ -0,0 +1,28 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPPOLYFILLARC_H
+#define __RDPPOLYFILLARC_H
+
+void
+rdpPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc* parcs);
+
+#endif
diff --git a/xorg/server/module/rdpPolyFillRect.c b/xorg/server/module/rdpPolyFillRect.c
new file mode 100644
index 00000000..dc929f9f
--- /dev/null
+++ b/xorg/server/module/rdpPolyFillRect.c
@@ -0,0 +1,50 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+static void
+rdpPolyFillRectOrg(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
+ xRectangle *prectInit)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ pGC->ops->PolyFillRect(pDrawable, pGC, nrectFill, prectInit);
+ GC_OP_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+void
+rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
+ xRectangle *prectInit)
+{
+ LLOGLN(10, ("rdpPolyFillRect:"));
+ /* do original call */
+ rdpPolyFillRectOrg(pDrawable, pGC, nrectFill, prectInit);
+}
diff --git a/xorg/server/module/rdpPolyFillRect.h b/xorg/server/module/rdpPolyFillRect.h
new file mode 100644
index 00000000..94ac4b59
--- /dev/null
+++ b/xorg/server/module/rdpPolyFillRect.h
@@ -0,0 +1,29 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPPOLYFILLRECT_H
+#define __RDPPOLYFILLRECT_H
+
+void
+rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
+ xRectangle* prectInit);
+
+#endif
diff --git a/xorg/server/module/rdpPolyGlyphBlt.c b/xorg/server/module/rdpPolyGlyphBlt.c
new file mode 100644
index 00000000..5265ed72
--- /dev/null
+++ b/xorg/server/module/rdpPolyGlyphBlt.c
@@ -0,0 +1,52 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+void
+rdpPolyGlyphBltOrg(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, unsigned int nglyph,
+ CharInfoPtr *ppci, pointer pglyphBase)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ pGC->ops->PolyGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
+ GC_OP_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+void
+rdpPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, unsigned int nglyph,
+ CharInfoPtr *ppci, pointer pglyphBase)
+{
+ LLOGLN(10, ("rdpPolyGlyphBlt:"));
+ /* do original call */
+ rdpPolyGlyphBltOrg(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
+}
diff --git a/xorg/server/module/rdpPolyGlyphBlt.h b/xorg/server/module/rdpPolyGlyphBlt.h
new file mode 100644
index 00000000..9c6519d8
--- /dev/null
+++ b/xorg/server/module/rdpPolyGlyphBlt.h
@@ -0,0 +1,30 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPPOLYGLYPHBLT_H
+#define __RDPPOLYGLYPHBLT_H
+
+void
+rdpPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, unsigned int nglyph,
+ CharInfoPtr* ppci, pointer pglyphBase);
+
+#endif
diff --git a/xorg/server/module/rdpPolyPoint.c b/xorg/server/module/rdpPolyPoint.c
new file mode 100644
index 00000000..6c9c77c1
--- /dev/null
+++ b/xorg/server/module/rdpPolyPoint.c
@@ -0,0 +1,50 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+void
+rdpPolyPointOrg(DrawablePtr pDrawable, GCPtr pGC, int mode,
+ int npt, DDXPointPtr in_pts)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ pGC->ops->PolyPoint(pDrawable, pGC, mode, npt, in_pts);
+ GC_OP_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+void
+rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode,
+ int npt, DDXPointPtr in_pts)
+{
+ LLOGLN(10, ("rdpPolyPoint:"));
+ /* do original call */
+ rdpPolyPointOrg(pDrawable, pGC, mode, npt, in_pts);
+}
diff --git a/xorg/server/module/rdpPolyPoint.h b/xorg/server/module/rdpPolyPoint.h
new file mode 100644
index 00000000..87bf9459
--- /dev/null
+++ b/xorg/server/module/rdpPolyPoint.h
@@ -0,0 +1,29 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPPOLYPOINT_H
+#define __RDPPOLYPOINT_H
+
+void
+rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode,
+ int npt, DDXPointPtr in_pts);
+
+#endif
diff --git a/xorg/server/module/rdpPolyRectangle.c b/xorg/server/module/rdpPolyRectangle.c
new file mode 100644
index 00000000..e80b8178
--- /dev/null
+++ b/xorg/server/module/rdpPolyRectangle.c
@@ -0,0 +1,51 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+static void
+rdpPolyRectangleOrg(DrawablePtr pDrawable, GCPtr pGC, int nrects,
+ xRectangle *rects)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ pGC->ops->PolyRectangle(pDrawable, pGC, nrects, rects);
+ GC_OP_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+/* tested with pGC->lineWidth = 0, 1, 2, 4 and opcodes 3 and 6 */
+void
+rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects,
+ xRectangle *rects)
+{
+ LLOGLN(10, ("rdpPolyRectangle:"));
+ /* do original call */
+ rdpPolyRectangleOrg(pDrawable, pGC, nrects, rects);
+}
diff --git a/xorg/server/module/rdpPolyRectangle.h b/xorg/server/module/rdpPolyRectangle.h
new file mode 100644
index 00000000..d09446d5
--- /dev/null
+++ b/xorg/server/module/rdpPolyRectangle.h
@@ -0,0 +1,29 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPPOLYRECTANGLE_H
+#define __RDPPOLYRECTANGLE_H
+
+void
+rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects,
+ xRectangle* rects);
+
+#endif
diff --git a/xorg/server/module/rdpPolySegment.c b/xorg/server/module/rdpPolySegment.c
new file mode 100644
index 00000000..f4a9d40c
--- /dev/null
+++ b/xorg/server/module/rdpPolySegment.c
@@ -0,0 +1,48 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+void
+rdpPolySegmentOrg(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ pGC->ops->PolySegment(pDrawable, pGC, nseg, pSegs);
+ GC_OP_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+void
+rdpPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs)
+{
+ LLOGLN(10, ("rdpPolySegment:"));
+ /* do original call */
+ rdpPolySegmentOrg(pDrawable, pGC, nseg, pSegs);
+}
diff --git a/xorg/server/module/rdpPolySegment.h b/xorg/server/module/rdpPolySegment.h
new file mode 100644
index 00000000..8c5f33ab
--- /dev/null
+++ b/xorg/server/module/rdpPolySegment.h
@@ -0,0 +1,28 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPPOLYSEGMENT_H
+#define __RDPPOLYSEGMENT_H
+
+void
+rdpPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment* pSegs);
+
+#endif
diff --git a/xorg/server/module/rdpPolyText16.c b/xorg/server/module/rdpPolyText16.c
new file mode 100644
index 00000000..b5eac8c5
--- /dev/null
+++ b/xorg/server/module/rdpPolyText16.c
@@ -0,0 +1,55 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+int
+rdpPolyText16Org(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, int count, unsigned short *chars)
+{
+ int rv;
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ rv = pGC->ops->PolyText16(pDrawable, pGC, x, y, count, chars);
+ GC_OP_EPILOGUE(pGC);
+ return rv;
+}
+
+/******************************************************************************/
+int
+rdpPolyText16(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, int count, unsigned short *chars)
+{
+ int rv;
+
+ LLOGLN(10, ("rdpPolyText16:"));
+ /* do original call */
+ rv = rdpPolyText16Org(pDrawable, pGC, x, y, count, chars);
+ return rv;
+}
diff --git a/xorg/server/module/rdpPolyText16.h b/xorg/server/module/rdpPolyText16.h
new file mode 100644
index 00000000..bcfa8379
--- /dev/null
+++ b/xorg/server/module/rdpPolyText16.h
@@ -0,0 +1,29 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPPOLYTEXT16_H
+#define __RDPPOLYTEXT16_H
+
+int
+rdpPolyText16(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, int count, unsigned short* chars);
+
+#endif
diff --git a/xorg/server/module/rdpPolyText8.c b/xorg/server/module/rdpPolyText8.c
new file mode 100644
index 00000000..8931a4c1
--- /dev/null
+++ b/xorg/server/module/rdpPolyText8.c
@@ -0,0 +1,55 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+int
+rdpPolyText8Org(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, int count, char *chars)
+{
+ int rv;
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ rv = pGC->ops->PolyText8(pDrawable, pGC, x, y, count, chars);
+ GC_OP_EPILOGUE(pGC);
+ return rv;
+}
+
+/******************************************************************************/
+int
+rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, int count, char *chars)
+{
+ int rv;
+
+ LLOGLN(10, ("rdpPolyText8:"));
+ /* do original call */
+ rv = rdpPolyText8Org(pDrawable, pGC, x, y, count, chars);
+ return rv;
+}
diff --git a/xorg/server/module/rdpPolyText8.h b/xorg/server/module/rdpPolyText8.h
new file mode 100644
index 00000000..95e80412
--- /dev/null
+++ b/xorg/server/module/rdpPolyText8.h
@@ -0,0 +1,29 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPPOLYTEXT8_H
+#define __RDPPOLYTEXT8_H
+
+int
+rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
+ int x, int y, int count, char* chars);
+
+#endif
diff --git a/xorg/server/module/rdpPolylines.c b/xorg/server/module/rdpPolylines.c
new file mode 100644
index 00000000..b439db28
--- /dev/null
+++ b/xorg/server/module/rdpPolylines.c
@@ -0,0 +1,50 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+static void
+rdpPolylinesOrg(DrawablePtr pDrawable, GCPtr pGC, int mode,
+ int npt, DDXPointPtr pptInit)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ pGC->ops->Polylines(pDrawable, pGC, mode, npt, pptInit);
+ GC_OP_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+void
+rdpPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode,
+ int npt, DDXPointPtr pptInit)
+{
+ LLOGLN(10, ("rdpPolylines:"));
+ /* do original call */
+ rdpPolylinesOrg(pDrawable, pGC, mode, npt, pptInit);
+}
diff --git a/xorg/server/module/rdpPolylines.h b/xorg/server/module/rdpPolylines.h
new file mode 100644
index 00000000..2df3d388
--- /dev/null
+++ b/xorg/server/module/rdpPolylines.h
@@ -0,0 +1,29 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPPOLYLINES_H
+#define __RDPPOLYLINES_H
+
+void
+rdpPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode,
+ int npt, DDXPointPtr pptInit);
+
+#endif
diff --git a/xorg/server/module/rdpPri.c b/xorg/server/module/rdpPri.c
new file mode 100644
index 00000000..d8346fa9
--- /dev/null
+++ b/xorg/server/module/rdpPri.c
@@ -0,0 +1,89 @@
+/*
+Copyright 2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+to deal with privates changing in xorg versions
+
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* this should be before all X11 .h files */
+#include <xorg-server.h>
+
+/* all driver need this */
+#include <xf86.h>
+#include <xf86_OSproc.h>
+
+#include <mipointer.h>
+#include <fb.h>
+#include <micmap.h>
+#include <mi.h>
+
+#include "rdpPri.h"
+
+/*****************************************************************************/
+rdpDevPrivateKey
+rdpAllocateGCPrivate(ScreenPtr pScreen, int bytes)
+{
+ return 0;
+}
+
+/*****************************************************************************/
+rdpDevPrivateKey
+rdpAllocatePixmapPrivate(ScreenPtr pScreen, int bytes)
+{
+ return 0;
+}
+
+/*****************************************************************************/
+rdpDevPrivateKey
+rdpAllocateWindowPrivate(ScreenPtr pScreen, int bytes)
+{
+ return 0;
+}
+
+/*****************************************************************************/
+void*
+rdpGetGCPrivate(GCPtr pGC, rdpDevPrivateKey key)
+{
+ return 0;
+}
+
+/*****************************************************************************/
+void*
+rdpGetPixmapPrivate(PixmapPtr pPixmap, rdpDevPrivateKey key)
+{
+ return 0;
+}
+
+/*****************************************************************************/
+void*
+rdpGetWindowPrivate(WindowPtr pWindow, rdpDevPrivateKey key)
+{
+ return 0;
+}
+
+/*****************************************************************************/
+int
+rdpPrivateInit(void)
+{
+ return 0;
+}
diff --git a/xorg/server/module/rdpPri.h b/xorg/server/module/rdpPri.h
new file mode 100644
index 00000000..625947a3
--- /dev/null
+++ b/xorg/server/module/rdpPri.h
@@ -0,0 +1,47 @@
+/*
+Copyright 2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+to deal with privates changing in xorg versions
+
+*/
+
+#ifndef _XRDPPRI_H
+#define _XRDPPRI_H
+
+#include <screenint.h>
+#include <gc.h>
+
+typedef void* rdpDevPrivateKey;
+
+rdpDevPrivateKey
+rdpAllocateGCPrivate(ScreenPtr pScreen, int bytes);
+rdpDevPrivateKey
+rdpAllocatePixmapPrivate(ScreenPtr pScreen, int bytes);
+rdpDevPrivateKey
+rdpAllocateWindowPrivate(ScreenPtr pScreen, int bytes);
+void*
+rdpGetGCPrivate(GCPtr pGC, rdpDevPrivateKey key);
+void*
+rdpGetPixmapPrivate(PixmapPtr pPixmap, rdpDevPrivateKey key);
+void*
+rdpGetWindowPrivate(WindowPtr pWindow, rdpDevPrivateKey key);
+int
+rdpPrivateInit(void);
+
+#endif
diff --git a/xorg/server/module/rdpPushPixels.c b/xorg/server/module/rdpPushPixels.c
new file mode 100644
index 00000000..3491d556
--- /dev/null
+++ b/xorg/server/module/rdpPushPixels.c
@@ -0,0 +1,50 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+void
+rdpPushPixelsOrg(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
+ int w, int h, int x, int y)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ pGC->ops->PushPixels(pGC, pBitMap, pDst, w, h, x, y);
+ GC_OP_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+void
+rdpPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
+ int w, int h, int x, int y)
+{
+ LLOGLN(10, ("rdpPushPixels:"));
+ /* do original call */
+ rdpPushPixelsOrg(pGC, pBitMap, pDst, w, h, x, y);
+}
diff --git a/xorg/server/module/rdpPushPixels.h b/xorg/server/module/rdpPushPixels.h
new file mode 100644
index 00000000..2e0cd1d1
--- /dev/null
+++ b/xorg/server/module/rdpPushPixels.h
@@ -0,0 +1,29 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPPUSHPIXELS_H
+#define __RDPPUSHPIXELS_H
+
+void
+rdpPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
+ int w, int h, int x, int y);
+
+#endif
diff --git a/xorg/server/module/rdpPutImage.c b/xorg/server/module/rdpPutImage.c
new file mode 100644
index 00000000..2d9faa89
--- /dev/null
+++ b/xorg/server/module/rdpPutImage.c
@@ -0,0 +1,51 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+static void
+rdpPutImageOrg(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y,
+ int w, int h, int leftPad, int format, char *pBits)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ pGC->ops->PutImage(pDst, pGC, depth, x, y, w, h, leftPad,
+ format, pBits);
+ GC_OP_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+void
+rdpPutImage(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y,
+ int w, int h, int leftPad, int format, char *pBits)
+{
+ LLOGLN(10, ("rdpPutImage:"));
+ /* do original call */
+ rdpPutImageOrg(pDst, pGC, depth, x, y, w, h, leftPad, format, pBits);
+}
diff --git a/xorg/server/module/rdpPutImage.h b/xorg/server/module/rdpPutImage.h
new file mode 100644
index 00000000..82e27872
--- /dev/null
+++ b/xorg/server/module/rdpPutImage.h
@@ -0,0 +1,29 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPPUTIMAGE_H
+#define __RDPPUTIMAGE_H
+
+void
+rdpPutImage(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y,
+ int w, int h, int leftPad, int format, char* pBits);
+
+#endif
diff --git a/xorg/server/module/rdpSetSpans.c b/xorg/server/module/rdpSetSpans.c
new file mode 100644
index 00000000..1bd9ed80
--- /dev/null
+++ b/xorg/server/module/rdpSetSpans.c
@@ -0,0 +1,52 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#include "rdp.h"
+#include "rdpDraw.h"
+
+#define LDEBUG 0
+
+#define LOG_LEVEL 1
+#define LLOGLN(_level, _args) \
+ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
+
+/******************************************************************************/
+void
+rdpSetSpansOrg(DrawablePtr pDrawable, GCPtr pGC, char *psrc,
+ DDXPointPtr ppt, int *pwidth, int nspans, int fSorted)
+{
+ rdpGCPtr priv;
+ GCFuncs *oldFuncs;
+
+ GC_OP_PROLOGUE(pGC);
+ pGC->ops->SetSpans(pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted);
+ GC_OP_EPILOGUE(pGC);
+}
+
+/******************************************************************************/
+void
+rdpSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *psrc,
+ DDXPointPtr ppt, int *pwidth, int nspans, int fSorted)
+{
+ LLOGLN(0, ("rdpSetSpans:"));
+ /* do original call */
+ rdpSetSpansOrg(pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted);
+}
diff --git a/xorg/server/module/rdpSetSpans.h b/xorg/server/module/rdpSetSpans.h
new file mode 100644
index 00000000..acaedd66
--- /dev/null
+++ b/xorg/server/module/rdpSetSpans.h
@@ -0,0 +1,29 @@
+/*
+Copyright 2005-2013 Jay Sorg
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+#ifndef __RDPSETSPANS_H
+#define __RDPSETSPANS_H
+
+void
+rdpSetSpans(DrawablePtr pDrawable, GCPtr pGC, char* psrc,
+ DDXPointPtr ppt, int* pwidth, int nspans, int fSorted);
+
+#endif