From 320ce8ba47d3d7c344b5de84844d1fa90e346fde Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Wed, 22 Jan 2014 10:31:05 -0800 Subject: xorg: work on xorg driver --- xorg/server/module/rdpCopyArea.c | 1 - xorg/server/module/rdpCopyPlane.c | 2 +- xorg/server/module/rdpDraw.c | 3 +- xorg/server/module/rdpDraw.h | 2 +- xorg/server/module/rdpFillPolygon.c | 2 +- xorg/server/module/rdpImageGlyphBlt.c | 4 +- xorg/server/module/rdpImageText8.c | 66 ++++++++++++++++++++- xorg/server/module/rdpPolyArc.c | 2 +- xorg/server/module/rdpPolyFillRect.c | 14 +++-- xorg/server/module/rdpPolyGlyphBlt.c | 2 +- xorg/server/module/rdpPolyPoint.c | 2 +- xorg/server/module/rdpPolyRectangle.c | 105 +++++++++++++++++++++++++++++++++- xorg/server/module/rdpPolySegment.c | 2 +- xorg/server/module/rdpPolyText16.c | 66 ++++++++++++++++++++- xorg/server/module/rdpPolyText8.c | 66 ++++++++++++++++++++- xorg/server/module/rdpPolylines.c | 2 +- xorg/server/module/rdpPri.h | 2 +- xorg/server/module/rdpPushPixels.c | 2 +- xorg/server/module/rdpReg.c | 11 ++++ xorg/server/module/rdpReg.h | 2 + 20 files changed, 335 insertions(+), 23 deletions(-) (limited to 'xorg') diff --git a/xorg/server/module/rdpCopyArea.c b/xorg/server/module/rdpCopyArea.c index cc98ab31..2daf8553 100644 --- a/xorg/server/module/rdpCopyArea.c +++ b/xorg/server/module/rdpCopyArea.c @@ -110,7 +110,6 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, RegionRec clip_reg; int cd; - LLOGLN(10, ("rdpCopyArea:")); dev = rdpGetDevFromScreen(pGC->pScreen); rdpRegionInit(&clip_reg, NullBox, 0); diff --git a/xorg/server/module/rdpCopyPlane.c b/xorg/server/module/rdpCopyPlane.c index 5dae9f09..9d9188a2 100644 --- a/xorg/server/module/rdpCopyPlane.c +++ b/xorg/server/module/rdpCopyPlane.c @@ -61,7 +61,7 @@ rdpCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, { RegionPtr rv; - LLOGLN(10, ("rdpCopyPlane:")); + LLOGLN(0, ("rdpCopyPlane:")); /* do original call */ rv = rdpCopyPlaneOrg(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, bitPlane); diff --git a/xorg/server/module/rdpDraw.c b/xorg/server/module/rdpDraw.c index f4eac7af..4415a18e 100644 --- a/xorg/server/module/rdpDraw.c +++ b/xorg/server/module/rdpDraw.c @@ -27,6 +27,7 @@ misc draw calls /* this should be before all X11 .h files */ #include +#include /* all driver need this */ #include @@ -365,7 +366,7 @@ rdpCloseScreen(int index, ScreenPtr pScreen) WindowPtr rdpGetRootWindowPtr(ScreenPtr pScreen) { -#if XORG_VERSION_CURRENT < (((1) * 10000000) + ((9) * 100000) + ((0) * 1000) + 0) +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 9, 0, 0, 0) return WindowTable[pScreen->myNum]; /* in globals.c */ #else return pScreen->root; diff --git a/xorg/server/module/rdpDraw.h b/xorg/server/module/rdpDraw.h index b471b4d2..05fd0849 100644 --- a/xorg/server/module/rdpDraw.h +++ b/xorg/server/module/rdpDraw.h @@ -27,7 +27,7 @@ misc draw calls #include #include -/* true is drawable is window or pixmap is screen */ +/* true if drawable is window or pixmap is screen */ #define XRDP_DRAWABLE_IS_VISIBLE(_dev, _drw) \ (((_drw)->type == DRAWABLE_WINDOW && ((WindowPtr)(_drw))->viewable) || \ ((_drw)->type == DRAWABLE_PIXMAP && \ diff --git a/xorg/server/module/rdpFillPolygon.c b/xorg/server/module/rdpFillPolygon.c index 475dc3d5..405e50df 100644 --- a/xorg/server/module/rdpFillPolygon.c +++ b/xorg/server/module/rdpFillPolygon.c @@ -56,7 +56,7 @@ rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC, int shape, int mode, int count, DDXPointPtr pPts) { - LLOGLN(10, ("rdpFillPolygon:")); + LLOGLN(0, ("rdpFillPolygon:")); /* do original call */ rdpFillPolygonOrg(pDrawable, pGC, shape, mode, count, pPts); } diff --git a/xorg/server/module/rdpImageGlyphBlt.c b/xorg/server/module/rdpImageGlyphBlt.c index e09ce256..be58e683 100644 --- a/xorg/server/module/rdpImageGlyphBlt.c +++ b/xorg/server/module/rdpImageGlyphBlt.c @@ -32,6 +32,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "rdp.h" #include "rdpDraw.h" +#include "rdpClientCon.h" +#include "rdpReg.h" #define LOG_LEVEL 1 #define LLOGLN(_level, _args) \ @@ -56,7 +58,7 @@ rdpImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr *ppci, pointer pglyphBase) { - LLOGLN(10, ("rdpImageGlyphBlt:")); + LLOGLN(0, ("rdpImageGlyphBlt:")); /* do original call */ rdpImageGlyphBltOrg(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); } diff --git a/xorg/server/module/rdpImageText8.c b/xorg/server/module/rdpImageText8.c index 42fb42d5..28b45c2b 100644 --- a/xorg/server/module/rdpImageText8.c +++ b/xorg/server/module/rdpImageText8.c @@ -39,6 +39,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define LLOGLN(_level, _args) \ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0) +/******************************************************************************/ +void +rdpImageText8Pre(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, + int x, int y, int count, char *chars, + BoxPtr box) +{ +} + /******************************************************************************/ void rdpImageText8Org(DrawablePtr pDrawable, GCPtr pGC, @@ -51,13 +61,65 @@ rdpImageText8Org(DrawablePtr pDrawable, GCPtr pGC, GC_OP_EPILOGUE(pGC); } +/******************************************************************************/ +void +rdpImageText8Post(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, + int x, int y, int count, char *chars, + BoxPtr box) +{ + RegionRec reg; + + if (cd == 0) + { + return; + } + if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable)) + { + return; + } + rdpRegionInit(®, box, 0); + if (cd == 2) + { + rdpRegionIntersect(®, clip_reg, ®); + } + rdpClientConAddDirtyScreenReg(dev, clientCon, ®); + RegionUninit(®); +} + /******************************************************************************/ void rdpImageText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, char *chars) { - LLOGLN(0, ("rdpImageText8:")); + rdpPtr dev; + rdpClientCon *clientCon; + RegionRec clip_reg; + int cd; + BoxRec box; + + LLOGLN(10, ("rdpImageText8:")); + dev = rdpGetDevFromScreen(pGC->pScreen); + GetTextBoundingBox(pDrawable, pGC->font, x, y, count, &box); + rdpRegionInit(&clip_reg, NullBox, 0); + cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC); + LLOGLN(10, ("rdpImageText8: cd %d", cd)); + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpImageText8Pre(dev, clientCon, cd, &clip_reg, pDrawable, pGC, + x, y, count, chars, &box); + clientCon = clientCon->next; + } /* do original call */ rdpImageText8Org(pDrawable, pGC, x, y, count, chars); - return; + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpImageText8Post(dev, clientCon, cd, &clip_reg, pDrawable, pGC, + x, y, count, chars, &box); + clientCon = clientCon->next; + } + RegionUninit(&clip_reg); } diff --git a/xorg/server/module/rdpPolyArc.c b/xorg/server/module/rdpPolyArc.c index c669c650..fb7abee0 100644 --- a/xorg/server/module/rdpPolyArc.c +++ b/xorg/server/module/rdpPolyArc.c @@ -52,7 +52,7 @@ rdpPolyArcOrg(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs) void rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs) { - LLOGLN(10, ("rdpPolyArc:")); + LLOGLN(0, ("rdpPolyArc:")); /* do original call */ rdpPolyArcOrg(pDrawable, pGC, narcs, parcs); } diff --git a/xorg/server/module/rdpPolyFillRect.c b/xorg/server/module/rdpPolyFillRect.c index 434fe504..e41f705d 100644 --- a/xorg/server/module/rdpPolyFillRect.c +++ b/xorg/server/module/rdpPolyFillRect.c @@ -43,7 +43,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. static void rdpPolyFillRectPre(rdpPtr dev, rdpClientCon *clientCon, int cd, RegionPtr clip_reg, - DrawablePtr pDrawable, GCPtr pGC, RegionPtr fill_reg) + DrawablePtr pDrawable, GCPtr pGC, + int nrectFill, xRectangle *prectInit, + RegionPtr fill_reg) { } @@ -63,7 +65,9 @@ rdpPolyFillRectOrg(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, static void rdpPolyFillRectPost(rdpPtr dev, rdpClientCon *clientCon, int cd, RegionPtr clip_reg, - DrawablePtr pDrawable, GCPtr pGC, RegionPtr fill_reg) + DrawablePtr pDrawable, GCPtr pGC, + int nrectFill, xRectangle *prectInit, + RegionPtr fill_reg) { if (cd == 0) { @@ -105,7 +109,7 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, while (clientCon != NULL) { rdpPolyFillRectPre(dev, clientCon, cd, &clip_reg, pDrawable, - pGC, fill_reg); + pGC, nrectFill, prectInit, fill_reg); clientCon = clientCon->next; } /* do original call */ @@ -114,9 +118,9 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, while (clientCon != NULL) { rdpPolyFillRectPost(dev, clientCon, cd, &clip_reg, pDrawable, - pGC, fill_reg); + pGC, nrectFill, prectInit, fill_reg); clientCon = clientCon->next; } - RegionUninit(&clip_reg); + rdpRegionUninit(&clip_reg); rdpRegionDestroy(fill_reg); } diff --git a/xorg/server/module/rdpPolyGlyphBlt.c b/xorg/server/module/rdpPolyGlyphBlt.c index f1fae911..7801a15e 100644 --- a/xorg/server/module/rdpPolyGlyphBlt.c +++ b/xorg/server/module/rdpPolyGlyphBlt.c @@ -56,7 +56,7 @@ rdpPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr *ppci, pointer pglyphBase) { - LLOGLN(10, ("rdpPolyGlyphBlt:")); + LLOGLN(0, ("rdpPolyGlyphBlt:")); /* do original call */ rdpPolyGlyphBltOrg(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); } diff --git a/xorg/server/module/rdpPolyPoint.c b/xorg/server/module/rdpPolyPoint.c index eb6f55dd..afe94a34 100644 --- a/xorg/server/module/rdpPolyPoint.c +++ b/xorg/server/module/rdpPolyPoint.c @@ -54,7 +54,7 @@ void rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr in_pts) { - LLOGLN(10, ("rdpPolyPoint:")); + LLOGLN(0, ("rdpPolyPoint:")); /* do original call */ rdpPolyPointOrg(pDrawable, pGC, mode, npt, in_pts); } diff --git a/xorg/server/module/rdpPolyRectangle.c b/xorg/server/module/rdpPolyRectangle.c index b6f56daa..b7cfe982 100644 --- a/xorg/server/module/rdpPolyRectangle.c +++ b/xorg/server/module/rdpPolyRectangle.c @@ -32,11 +32,22 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "rdp.h" #include "rdpDraw.h" +#include "rdpClientCon.h" +#include "rdpReg.h" #define LOG_LEVEL 1 #define LLOGLN(_level, _args) \ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0) +/******************************************************************************/ +void +rdpPolyRectanglePre(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, int nrects, + xRectangle *rects, RegionPtr reg) +{ +} + /******************************************************************************/ static void rdpPolyRectangleOrg(DrawablePtr pDrawable, GCPtr pGC, int nrects, @@ -50,12 +61,104 @@ rdpPolyRectangleOrg(DrawablePtr pDrawable, GCPtr pGC, int nrects, } /******************************************************************************/ -/* tested with pGC->lineWidth = 0, 1, 2, 4 and opcodes 3 and 6 */ +void +rdpPolyRectanglePost(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, int nrects, + xRectangle *rects, RegionPtr reg) +{ + if (cd == 0) + { + return; + } + if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable)) + { + return; + } + if (cd == 2) + { + rdpRegionIntersect(reg, clip_reg, reg); + } + rdpClientConAddDirtyScreenReg(dev, clientCon, reg); +} + +/******************************************************************************/ void rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects, xRectangle *rects) { + rdpPtr dev; + rdpClientCon *clientCon; + BoxRec box; + int index; + int up; + int down; + int lw; + int cd; + RegionRec clip_reg; + RegionRec reg; + LLOGLN(10, ("rdpPolyRectangle:")); + dev = rdpGetDevFromScreen(pGC->pScreen); + + rdpRegionInit(®, NullBox, 0); + lw = pGC->lineWidth; + if (lw < 1) + { + lw = 1; + } + up = lw / 2; + down = 1 + (lw - 1) / 2; + index = 0; + while (index < nrects) + { + + box.x1 = (rects[index].x + pDrawable->x) - up; + box.y1 = (rects[index].y + pDrawable->y) - up; + box.x2 = box.x1 + rects[index].width + (up + down); + box.y2 = box.y1 + lw; + rdpRegionUnionRect(®, &box); + + box.x1 = (rects[index].x + pDrawable->x) - up; + box.y1 = (rects[index].y + pDrawable->y) + down; + box.x2 = box.x1 + lw; + box.y2 = box.y1 + rects[index].height - (up + down); + rdpRegionUnionRect(®, &box); + + box.x1 = ((rects[index].x + rects[index].width) + pDrawable->x) - up; + box.y1 = (rects[index].y + pDrawable->y) + down; + box.x2 = box.x1 + lw; + box.y2 = box.y1 + rects[index].height - (up + down); + rdpRegionUnionRect(®, &box); + + box.x1 = (rects[index].x + pDrawable->x) - up; + box.y1 = ((rects[index].y + rects[index].height) + pDrawable->y) - up; + box.x2 = box.x1 + rects[index].width + (up + down); + box.y2 = box.y1 + lw; + rdpRegionUnionRect(®, &box); + + index++; + } + + rdpRegionInit(&clip_reg, NullBox, 0); + cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC); + LLOGLN(10, ("rdpPolyRectangle: cd %d", cd)); + + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpPolyRectanglePre(dev, clientCon, cd, &clip_reg, pDrawable, pGC, + nrects, rects, ®); + clientCon = clientCon->next; + } /* do original call */ rdpPolyRectangleOrg(pDrawable, pGC, nrects, rects); + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpPolyRectanglePost(dev, clientCon, cd, &clip_reg, pDrawable, pGC, + nrects, rects, ®); + clientCon = clientCon->next; + } + rdpRegionUninit(®); } diff --git a/xorg/server/module/rdpPolySegment.c b/xorg/server/module/rdpPolySegment.c index 0e388f08..00ac0ac2 100644 --- a/xorg/server/module/rdpPolySegment.c +++ b/xorg/server/module/rdpPolySegment.c @@ -52,7 +52,7 @@ rdpPolySegmentOrg(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs) void rdpPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs) { - LLOGLN(10, ("rdpPolySegment:")); + LLOGLN(0, ("rdpPolySegment:")); /* do original call */ rdpPolySegmentOrg(pDrawable, pGC, nseg, pSegs); } diff --git a/xorg/server/module/rdpPolyText16.c b/xorg/server/module/rdpPolyText16.c index 2c690978..0b8b6c51 100644 --- a/xorg/server/module/rdpPolyText16.c +++ b/xorg/server/module/rdpPolyText16.c @@ -32,11 +32,23 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "rdp.h" #include "rdpDraw.h" +#include "rdpClientCon.h" +#include "rdpReg.h" #define LOG_LEVEL 1 #define LLOGLN(_level, _args) \ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0) +/******************************************************************************/ +void +rdpPolyText16Pre(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, + int x, int y, int count, unsigned short *chars, + BoxPtr box) +{ +} + /******************************************************************************/ int rdpPolyText16Org(DrawablePtr pDrawable, GCPtr pGC, @@ -51,15 +63,67 @@ rdpPolyText16Org(DrawablePtr pDrawable, GCPtr pGC, return rv; } +/******************************************************************************/ +void +rdpPolyText16Post(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, + int x, int y, int count, unsigned short *chars, + BoxPtr box) +{ + RegionRec reg; + + if (cd == 0) + { + return; + } + if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable)) + { + return; + } + rdpRegionInit(®, box, 0); + if (cd == 2) + { + rdpRegionIntersect(®, clip_reg, ®); + } + rdpClientConAddDirtyScreenReg(dev, clientCon, ®); + RegionUninit(®); +} + /******************************************************************************/ int rdpPolyText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, unsigned short *chars) { int rv; + rdpPtr dev; + rdpClientCon *clientCon; + RegionRec clip_reg; + int cd; + BoxRec box; - LLOGLN(0, ("rdpPolyText16:")); + LLOGLN(10, ("rdpPolyText16:")); + dev = rdpGetDevFromScreen(pGC->pScreen); + GetTextBoundingBox(pDrawable, pGC->font, x, y, count, &box); + rdpRegionInit(&clip_reg, NullBox, 0); + cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC); + LLOGLN(10, ("rdpPolyText16: cd %d", cd)); + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpPolyText16Pre(dev, clientCon, cd, &clip_reg, pDrawable, pGC, + x, y, count, chars, &box); + clientCon = clientCon->next; + } /* do original call */ rv = rdpPolyText16Org(pDrawable, pGC, x, y, count, chars); + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpPolyText16Post(dev, clientCon, cd, &clip_reg, pDrawable, pGC, + x, y, count, chars, &box); + clientCon = clientCon->next; + } + RegionUninit(&clip_reg); return rv; } diff --git a/xorg/server/module/rdpPolyText8.c b/xorg/server/module/rdpPolyText8.c index 37748517..637b6b31 100644 --- a/xorg/server/module/rdpPolyText8.c +++ b/xorg/server/module/rdpPolyText8.c @@ -32,11 +32,23 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "rdp.h" #include "rdpDraw.h" +#include "rdpClientCon.h" +#include "rdpReg.h" #define LOG_LEVEL 1 #define LLOGLN(_level, _args) \ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0) +/******************************************************************************/ +void +rdpPolyText8Pre(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, + int x, int y, int count, char *chars, + BoxPtr box) +{ +} + /******************************************************************************/ int rdpPolyText8Org(DrawablePtr pDrawable, GCPtr pGC, @@ -51,15 +63,67 @@ rdpPolyText8Org(DrawablePtr pDrawable, GCPtr pGC, return rv; } +/******************************************************************************/ +void +rdpPolyText8Post(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, + int x, int y, int count, char *chars, + BoxPtr box) +{ + RegionRec reg; + + if (cd == 0) + { + return; + } + if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable)) + { + return; + } + rdpRegionInit(®, box, 0); + if (cd == 2) + { + rdpRegionIntersect(®, clip_reg, ®); + } + rdpClientConAddDirtyScreenReg(dev, clientCon, ®); + RegionUninit(®); +} + /******************************************************************************/ int rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, char *chars) { int rv; + rdpPtr dev; + rdpClientCon *clientCon; + RegionRec clip_reg; + int cd; + BoxRec box; - LLOGLN(0, ("rdpPolyText8:")); + LLOGLN(10, ("rdpPolyText8:")); + dev = rdpGetDevFromScreen(pGC->pScreen); + GetTextBoundingBox(pDrawable, pGC->font, x, y, count, &box); + rdpRegionInit(&clip_reg, NullBox, 0); + cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC); + LLOGLN(10, ("rdpPolyText8: cd %d", cd)); + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpPolyText8Pre(dev, clientCon, cd, &clip_reg, pDrawable, pGC, + x, y, count, chars, &box); + clientCon = clientCon->next; + } /* do original call */ rv = rdpPolyText8Org(pDrawable, pGC, x, y, count, chars); + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpPolyText8Post(dev, clientCon, cd, &clip_reg, pDrawable, pGC, + x, y, count, chars, &box); + clientCon = clientCon->next; + } + RegionUninit(&clip_reg); return rv; } diff --git a/xorg/server/module/rdpPolylines.c b/xorg/server/module/rdpPolylines.c index 015aa26a..ee7a6008 100644 --- a/xorg/server/module/rdpPolylines.c +++ b/xorg/server/module/rdpPolylines.c @@ -54,7 +54,7 @@ void rdpPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit) { - LLOGLN(10, ("rdpPolylines:")); + LLOGLN(0, ("rdpPolylines:")); /* do original call */ rdpPolylinesOrg(pDrawable, pGC, mode, npt, pptInit); } diff --git a/xorg/server/module/rdpPri.h b/xorg/server/module/rdpPri.h index 625947a3..97e570f5 100644 --- a/xorg/server/module/rdpPri.h +++ b/xorg/server/module/rdpPri.h @@ -1,5 +1,5 @@ /* -Copyright 2013 Jay Sorg +Copyright 2013-2014 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 diff --git a/xorg/server/module/rdpPushPixels.c b/xorg/server/module/rdpPushPixels.c index aa392578..8ab046b8 100644 --- a/xorg/server/module/rdpPushPixels.c +++ b/xorg/server/module/rdpPushPixels.c @@ -54,7 +54,7 @@ void rdpPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst, int w, int h, int x, int y) { - LLOGLN(10, ("rdpPushPixels:")); + LLOGLN(0, ("rdpPushPixels:")); /* do original call */ rdpPushPixelsOrg(pGC, pBitMap, pDst, w, h, x, y); } diff --git a/xorg/server/module/rdpReg.c b/xorg/server/module/rdpReg.c index 437b7969..20600f66 100644 --- a/xorg/server/module/rdpReg.c +++ b/xorg/server/module/rdpReg.c @@ -233,3 +233,14 @@ rdpRegionBreak(RegionPtr pReg) return RegionBreak(pReg); #endif } + +/*****************************************************************************/ +void +rdpRegionUnionRect(RegionPtr pReg, BoxPtr prect) +{ + RegionRec reg; + + rdpRegionInit(®, prect, 0); + rdpRegionUnion(pReg, pReg, ®); + rdpRegionUninit(®); +} diff --git a/xorg/server/module/rdpReg.h b/xorg/server/module/rdpReg.h index 2d640c00..38c4188a 100644 --- a/xorg/server/module/rdpReg.h +++ b/xorg/server/module/rdpReg.h @@ -56,5 +56,7 @@ void rdpRegionReset(RegionPtr pReg, BoxPtr pBox); Bool rdpRegionBreak(RegionPtr pReg); +void +rdpRegionUnionRect(RegionPtr pReg, BoxPtr prect); #endif -- cgit v1.2.1