diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2014-01-25 11:30:45 -0800 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2014-01-25 11:30:45 -0800 |
commit | 03e5b5e62bae5f872874869e62cc096c576fba16 (patch) | |
tree | 62aa1ee34ead892e0715f7da1c23ec188b441475 /xorg | |
parent | f39ba98a4ff48a2e6a12cb27027a0b06d139c55a (diff) | |
download | xrdp-proprietary-03e5b5e62bae5f872874869e62cc096c576fba16.tar.gz xrdp-proprietary-03e5b5e62bae5f872874869e62cc096c576fba16.zip |
xorg: work on xorg driver
Diffstat (limited to 'xorg')
-rw-r--r-- | xorg/server/module/rdp.h | 4 | ||||
-rw-r--r-- | xorg/server/module/rdpComposite.c | 97 | ||||
-rw-r--r-- | xorg/server/module/rdpComposite.h | 4 | ||||
-rw-r--r-- | xorg/server/module/rdpCopyArea.c | 36 | ||||
-rw-r--r-- | xorg/server/module/rdpGlyphs.c | 2 | ||||
-rw-r--r-- | xorg/server/module/rdpPolyArc.c | 10 | ||||
-rw-r--r-- | xorg/server/module/rdpPolyFillRect.c | 8 | ||||
-rw-r--r-- | xorg/server/module/rdpPolyPoint.c | 25 | ||||
-rw-r--r-- | xorg/server/module/rdpPolySegment.c | 87 | ||||
-rw-r--r-- | xorg/server/module/rdpPolylines.c | 85 | ||||
-rw-r--r-- | xorg/server/xrdpdev/xrdpdev.c | 3 |
11 files changed, 320 insertions, 41 deletions
diff --git a/xorg/server/module/rdp.h b/xorg/server/module/rdp.h index 7f055488..a26d4deb 100644 --- a/xorg/server/module/rdp.h +++ b/xorg/server/module/rdp.h @@ -149,7 +149,8 @@ struct _rdpCounts CARD32 rdpPushPixelsCallCount; /* 20 */ CARD32 rdpCompositeCallCount; CARD32 rdpCopyWindowCallCount; /* 22 */ - CARD32 callCount[64 - 22]; + CARD32 rdpTrapezoidsCallCount; + CARD32 callCount[64 - 23]; }; /* move this to common header */ @@ -177,6 +178,7 @@ struct _rdpRec CloseScreenProcPtr CloseScreen; CompositeProcPtr Composite; GlyphsProcPtr Glyphs; + TrapezoidsProcPtr Trapezoids; /* keyboard and mouse */ miPointerScreenFuncPtr pCursorFuncs; diff --git a/xorg/server/module/rdpComposite.c b/xorg/server/module/rdpComposite.c index 9b5125d4..af922598 100644 --- a/xorg/server/module/rdpComposite.c +++ b/xorg/server/module/rdpComposite.c @@ -105,8 +105,8 @@ rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, PictureScreenPtr ps; BoxRec box; - LLOGLN(10, ("rdpComposite:")); - pScreen = pSrc->pDrawable->pScreen; + LLOGLN(0, ("rdpComposite:")); + pScreen = pDst->pDrawable->pScreen; dev = rdpGetDevFromScreen(pScreen); dev->counts.rdpCompositeCallCount++; box.x1 = xDst + pDst->pDrawable->x; @@ -134,3 +134,96 @@ rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, clientCon = clientCon->next; } } + +/******************************************************************************/ +static void +rdpTrapezoidsPre(rdpPtr dev, rdpClientCon *clientCon, PictureScreenPtr ps, + CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, + int ntrap, xTrapezoid *traps, BoxPtr box) +{ +} + +/******************************************************************************/ +static void +rdpTrapezoidsOrg(PictureScreenPtr ps, rdpPtr dev, + CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, + int ntrap, xTrapezoid *traps) +{ + ps->Trapezoids = dev->Trapezoids; + ps->Trapezoids(op, pSrc, pDst, maskFormat, xSrc, ySrc, ntrap, traps); + ps->Trapezoids = rdpTrapezoids; +} + +/******************************************************************************/ +static void +rdpTrapezoidsPost(rdpPtr dev, rdpClientCon *clientCon, PictureScreenPtr ps, + CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, + int ntrap, xTrapezoid *traps, BoxPtr box) +{ + RegionRec reg; + + if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDst->pDrawable)) + { + return; + } + rdpRegionInit(®, box, 0); + if (pDst->pCompositeClip != 0) + { + rdpRegionIntersect(®, pDst->pCompositeClip, ®); + } + rdpClientConAddDirtyScreenReg(dev, clientCon, ®); + rdpRegionUninit(®); +} + +/******************************************************************************/ +void +rdpTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, + int ntrap, xTrapezoid *traps) +{ + ScreenPtr pScreen; + rdpPtr dev; + rdpClientCon *clientCon; + PictureScreenPtr ps; + BoxRec box; + RegionRec reg; + int index; + + LLOGLN(0, ("rdpTrapezoids:")); + pScreen = pDst->pDrawable->pScreen; + dev = rdpGetDevFromScreen(pScreen); + dev->counts.rdpTrapezoidsCallCount++; + + rdpRegionInit(®, NullBox, 0); + for (index = 0; index < ntrap; index++) + { + LLOGLN(0, (" top %d bottom %d left p1 %d %d", + traps[index].top, traps[index].bottom, + traps[index].left.p1.x, traps[index].left.p1.y)); + //box.x1 = traps[index].left + pDst->pDrawable->x; + //box.y1 = traps[index].top + pDst->pDrawable->y; + //box.x2 = traps[index].right + pDst->pDrawable->x; + //box.y2 = traps[index].bottom + pDst->pDrawable->y; + } + ps = GetPictureScreen(pScreen); + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + //rdpTrapezoidsPre(dev, clientCon, ps, op, pSrc, pDst, + // maskFormat, xSrc, ySrc, ntrap, traps, &box); + clientCon = clientCon->next; + } + /* do original call */ + rdpTrapezoidsOrg(ps, dev, op, pSrc, pDst, maskFormat, xSrc, ySrc, + ntrap, traps); + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + //rdpTrapezoidsPost(dev, clientCon, ps, op, pSrc, pDst, + // maskFormat, xSrc, ySrc, ntrap, traps, &box); + clientCon = clientCon->next; + } +} diff --git a/xorg/server/module/rdpComposite.h b/xorg/server/module/rdpComposite.h index 017cb41d..9b922e9d 100644 --- a/xorg/server/module/rdpComposite.h +++ b/xorg/server/module/rdpComposite.h @@ -28,5 +28,9 @@ void rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); +void +rdpTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, + int ntrap, xTrapezoid *traps); #endif diff --git a/xorg/server/module/rdpCopyArea.c b/xorg/server/module/rdpCopyArea.c index 7257fc3a..48a54b99 100644 --- a/xorg/server/module/rdpCopyArea.c +++ b/xorg/server/module/rdpCopyArea.c @@ -44,7 +44,8 @@ static void rdpCopyAreaPre(rdpPtr dev, rdpClientCon *clientCon, int cd, RegionPtr clip_reg, DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, - int srcx, int srcy, int w, int h, int dstx, int dsty) + int srcx, int srcy, int w, int h, int dstx, int dsty, + RegionPtr reg) { } @@ -67,10 +68,9 @@ static void rdpCopyAreaPost(rdpPtr dev, rdpClientCon *clientCon, int cd, RegionPtr clip_reg, DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, - int srcx, int srcy, int w, int h, int dstx, int dsty) + int srcx, int srcy, int w, int h, int dstx, int dsty, + RegionPtr reg) { - BoxRec box; - RegionRec reg; if (cd == XRDP_CD_NODRAW) { @@ -80,17 +80,7 @@ rdpCopyAreaPost(rdpPtr dev, rdpClientCon *clientCon, { return; } - box.x1 = dstx + pDst->x; - box.y1 = dsty + pDst->y; - box.x2 = box.x1 + w; - box.y2 = box.y1 + h; - rdpRegionInit(®, &box, 0); - if (cd == XRDP_CD_CLIP) - { - rdpRegionIntersect(®, clip_reg, ®); - } - rdpClientConAddDirtyScreenReg(dev, clientCon, ®); - rdpRegionUninit(®); + rdpClientConAddDirtyScreenReg(dev, clientCon, reg); } /******************************************************************************/ @@ -103,6 +93,8 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, RegionPtr rv; RegionRec clip_reg; int cd; + BoxRec box; + RegionRec reg; LLOGLN(10, ("rdpCopyArea:")); dev = rdpGetDevFromScreen(pGC->pScreen); @@ -110,11 +102,20 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, rdpRegionInit(&clip_reg, NullBox, 0); cd = rdpDrawGetClip(dev, &clip_reg, pDst, pGC); LLOGLN(10, ("rdpCopyArea: cd %d", cd)); + box.x1 = dstx + pDst->x; + box.y1 = dsty + pDst->y; + box.x2 = box.x1 + w; + box.y2 = box.y1 + h; + rdpRegionInit(®, &box, 0); + if (cd == XRDP_CD_CLIP) + { + rdpRegionIntersect(®, &clip_reg, ®); + } clientCon = dev->clientConHead; while (clientCon != NULL) { rdpCopyAreaPre(dev, clientCon, cd, &clip_reg, pSrc, pDst, pGC, - srcx, srcy, w, h, dstx, dsty); + srcx, srcy, w, h, dstx, dsty, ®); clientCon = clientCon->next; } /* do original call */ @@ -123,9 +124,10 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, while (clientCon != NULL) { rdpCopyAreaPost(dev, clientCon, cd, &clip_reg, pSrc, pDst, pGC, - srcx, srcy, w, h, dstx, dsty); + srcx, srcy, w, h, dstx, dsty, ®); clientCon = clientCon->next; } rdpRegionUninit(&clip_reg); + rdpRegionUninit(®); return rv; } diff --git a/xorg/server/module/rdpGlyphs.c b/xorg/server/module/rdpGlyphs.c index a4e93e47..e6fcbb30 100644 --- a/xorg/server/module/rdpGlyphs.c +++ b/xorg/server/module/rdpGlyphs.c @@ -96,7 +96,7 @@ rdpGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictureScreenPtr ps; LLOGLN(10, ("rdpGlyphs:")); - pScreen = pSrc->pDrawable->pScreen; + pScreen = pDst->pDrawable->pScreen; dev = rdpGetDevFromScreen(pScreen); ps = GetPictureScreen(pScreen); rdpGlyphsOrg(ps, dev, op, pSrc, pDst, maskFormat, xSrc, ySrc, diff --git a/xorg/server/module/rdpPolyArc.c b/xorg/server/module/rdpPolyArc.c index c3d6bef9..e0a3d128 100644 --- a/xorg/server/module/rdpPolyArc.c +++ b/xorg/server/module/rdpPolyArc.c @@ -74,10 +74,6 @@ rdpPolyArcPost(rdpPtr dev, rdpClientCon *clientCon, { return; } - if (cd == XRDP_CD_CLIP) - { - rdpRegionIntersect(reg, clip_reg, reg); - } rdpClientConAddDirtyScreenReg(dev, clientCon, reg); } @@ -95,7 +91,7 @@ rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs) RegionRec clip_reg; RegionRec reg; - LLOGLN(10, ("rdpPolyArc:")); + LLOGLN(0, ("rdpPolyArc:")); dev = rdpGetDevFromScreen(pGC->pScreen); dev->counts.rdpPolyArcCallCount++; rdpRegionInit(®, NullBox, 0); @@ -119,6 +115,10 @@ rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs) rdpRegionInit(&clip_reg, NullBox, 0); cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC); LLOGLN(10, ("rdpPolyArc: cd %d", cd)); + if (cd == XRDP_CD_CLIP) + { + rdpRegionIntersect(®, &clip_reg, ®); + } clientCon = dev->clientConHead; while (clientCon != NULL) { diff --git a/xorg/server/module/rdpPolyFillRect.c b/xorg/server/module/rdpPolyFillRect.c index e052d508..a3162d31 100644 --- a/xorg/server/module/rdpPolyFillRect.c +++ b/xorg/server/module/rdpPolyFillRect.c @@ -77,10 +77,6 @@ rdpPolyFillRectPost(rdpPtr dev, rdpClientCon *clientCon, { return; } - if (cd == XRDP_CD_CLIP) - { - rdpRegionIntersect(reg, clip_reg, reg); - } rdpClientConAddDirtyScreenReg(dev, clientCon, reg); } @@ -103,6 +99,10 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, rdpRegionTranslate(reg, pDrawable->x, pDrawable->y); rdpRegionInit(&clip_reg, NullBox, 0); cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC); + if (cd == XRDP_CD_CLIP) + { + rdpRegionIntersect(reg, &clip_reg, reg); + } LLOGLN(10, ("rdpPolyFillRect: cd %d", cd)); clientCon = dev->clientConHead; while (clientCon != NULL) diff --git a/xorg/server/module/rdpPolyPoint.c b/xorg/server/module/rdpPolyPoint.c index dafeb9bb..df151b84 100644 --- a/xorg/server/module/rdpPolyPoint.c +++ b/xorg/server/module/rdpPolyPoint.c @@ -67,6 +67,8 @@ rdpPolyPointPost(rdpPtr dev, rdpClientCon *clientCon, DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr in_pts, RegionPtr reg) { + RegionRec lreg; + if (cd == XRDP_CD_NODRAW) { return; @@ -75,11 +77,13 @@ rdpPolyPointPost(rdpPtr dev, rdpClientCon *clientCon, { return; } + rdpRegionInit(&lreg, NullBox, 0); if (cd == XRDP_CD_CLIP) { - rdpRegionIntersect(reg, clip_reg, reg); + rdpRegionIntersect(&lreg, clip_reg, reg); } - rdpClientConAddDirtyScreenReg(dev, clientCon, reg); + rdpClientConAddDirtyScreenReg(dev, clientCon, &lreg); + rdpRegionUninit(&lreg); } /******************************************************************************/ @@ -92,18 +96,24 @@ rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, RegionRec clip_reg; RegionRec reg; int cd; + int index; + BoxRec box; LLOGLN(0, ("rdpPolyPoint:")); dev = rdpGetDevFromScreen(pGC->pScreen); dev->counts.rdpPolyPointCallCount++; - rdpRegionInit(®, NullBox, 0); - /* TODO */ - + for (index = 0; index < npt; index++) + { + box.x1 = in_pts[index].x + pDrawable->x; + box.y1 = in_pts[index].y + pDrawable->y; + box.x2 = box.x1 + 1; + box.y2 = box.y1 + 1; + rdpRegionUnionRect(®, &box); + } rdpRegionInit(&clip_reg, NullBox, 0); cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC); LLOGLN(10, ("rdpPolyPoint: cd %d", cd)); - clientCon = dev->clientConHead; while (clientCon != NULL) { @@ -111,10 +121,8 @@ rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, pGC, mode, npt, in_pts, ®); clientCon = clientCon->next; } - /* do original call */ rdpPolyPointOrg(pDrawable, pGC, mode, npt, in_pts); - clientCon = dev->clientConHead; while (clientCon != NULL) { @@ -122,7 +130,6 @@ rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, pGC, mode, npt, in_pts, ®); clientCon = clientCon->next; } - rdpRegionUninit(&clip_reg); rdpRegionUninit(®); } diff --git a/xorg/server/module/rdpPolySegment.c b/xorg/server/module/rdpPolySegment.c index 00ac0ac2..d242f736 100644 --- a/xorg/server/module/rdpPolySegment.c +++ b/xorg/server/module/rdpPolySegment.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) \ @@ -39,6 +41,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /******************************************************************************/ void +rdpPolySegmentPre(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, int nseg, + xSegment *pSegs, RegionPtr reg) +{ +} + +/******************************************************************************/ +void rdpPolySegmentOrg(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs) { GC_OP_VARS; @@ -50,9 +61,83 @@ rdpPolySegmentOrg(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs) /******************************************************************************/ void +rdpPolySegmentPost(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, int nseg, + xSegment *pSegs, RegionPtr reg) +{ + RegionRec lreg; + + if (cd == XRDP_CD_NODRAW) + { + return; + } + if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable)) + { + return; + } + rdpRegionInit(&lreg, NullBox, 0); + if (cd == XRDP_CD_CLIP) + { + rdpRegionIntersect(&lreg, clip_reg, reg); + } + rdpClientConAddDirtyScreenReg(dev, clientCon, &lreg); + rdpRegionUninit(&lreg); +} + +/******************************************************************************/ +void rdpPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs) { - LLOGLN(0, ("rdpPolySegment:")); + rdpPtr dev; + rdpClientCon *clientCon; + RegionRec clip_reg; + RegionRec reg; + int cd; + int index; + int x1; + int y1; + int x2; + int y2; + BoxRec box; + + LLOGLN(10, ("rdpPolySegment:")); + dev = rdpGetDevFromScreen(pGC->pScreen); + dev->counts.rdpPolySegmentCallCount++; + rdpRegionInit(®, NullBox, 0); + for (index = 0; index < nseg; index++) + { + x1 = pSegs[index].x1 + pDrawable->x; + y1 = pSegs[index].y1 + pDrawable->y; + x2 = pSegs[index].x2 + pDrawable->x; + y2 = pSegs[index].y2 + pDrawable->y; + box.x1 = RDPMIN(x1, x2); + box.y1 = RDPMIN(y1, y2); + box.x2 = RDPMAX(x1, x2) + 1; + box.y2 = RDPMAX(y1, y2) + 1; + rdpRegionUnionRect(®, &box); + } + rdpRegionInit(&clip_reg, NullBox, 0); + cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC); + LLOGLN(10, ("rdpPolySegment: cd %d", cd)); + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpPolySegmentPre(dev, clientCon, cd, &clip_reg, pDrawable, + pGC, nseg, pSegs, ®); + clientCon = clientCon->next; + } /* do original call */ rdpPolySegmentOrg(pDrawable, pGC, nseg, pSegs); + + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpPolySegmentPost(dev, clientCon, cd, &clip_reg, pDrawable, + pGC, nseg, pSegs, ®); + clientCon = clientCon->next; + } + rdpRegionUninit(&clip_reg); + rdpRegionUninit(®); + } diff --git a/xorg/server/module/rdpPolylines.c b/xorg/server/module/rdpPolylines.c index ee7a6008..630f2827 100644 --- a/xorg/server/module/rdpPolylines.c +++ b/xorg/server/module/rdpPolylines.c @@ -32,12 +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 +rdpPolylinesPre(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, int mode, + int npt, DDXPointPtr pptInit, RegionPtr reg) +{ +} + +/******************************************************************************/ static void rdpPolylinesOrg(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit) @@ -51,10 +62,82 @@ rdpPolylinesOrg(DrawablePtr pDrawable, GCPtr pGC, int mode, /******************************************************************************/ void +rdpPolylinesPost(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, int mode, + int npt, DDXPointPtr pptInit, RegionPtr reg) +{ + RegionRec lreg; + + if (cd == XRDP_CD_NODRAW) + { + return; + } + if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable)) + { + return; + } + rdpRegionInit(&lreg, NullBox, 0); + if (cd == XRDP_CD_CLIP) + { + rdpRegionIntersect(&lreg, clip_reg, reg); + } + rdpClientConAddDirtyScreenReg(dev, clientCon, &lreg); + rdpRegionUninit(&lreg); +} + +/******************************************************************************/ +void rdpPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit) { - LLOGLN(0, ("rdpPolylines:")); + rdpPtr dev; + rdpClientCon *clientCon; + RegionRec clip_reg; + RegionRec reg; + int cd; + int index; + int x1; + int y1; + int x2; + int y2; + BoxRec box; + + LLOGLN(10, ("rdpPolylines:")); + dev = rdpGetDevFromScreen(pGC->pScreen); + dev->counts.rdpPolylinesCallCount++; + rdpRegionInit(®, NullBox, 0); + for (index = 1; index < npt; index++) + { + x1 = pptInit[index - 1].x + pDrawable->x; + y1 = pptInit[index - 1].y + pDrawable->y; + x2 = pptInit[index].x + pDrawable->x; + y2 = pptInit[index].y + pDrawable->y; + box.x1 = RDPMIN(x1, x2); + box.y1 = RDPMIN(y1, y2); + box.x2 = RDPMAX(x1, x2) + 1; + box.y2 = RDPMAX(y1, y2) + 1; + rdpRegionUnionRect(®, &box); + } + rdpRegionInit(&clip_reg, NullBox, 0); + cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC); + LLOGLN(10, ("rdpPolylines: cd %d", cd)); + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpPolylinesPre(dev, clientCon, cd, &clip_reg, pDrawable, + pGC, mode, npt, pptInit, ®); + clientCon = clientCon->next; + } /* do original call */ rdpPolylinesOrg(pDrawable, pGC, mode, npt, pptInit); + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpPolylinesPost(dev, clientCon, cd, &clip_reg, pDrawable, + pGC, mode, npt, pptInit, ®); + clientCon = clientCon->next; + } + rdpRegionUninit(&clip_reg); + rdpRegionUninit(®); } diff --git a/xorg/server/xrdpdev/xrdpdev.c b/xorg/server/xrdpdev/xrdpdev.c index 6c8f54d7..1afcdb0f 100644 --- a/xorg/server/xrdpdev/xrdpdev.c +++ b/xorg/server/xrdpdev/xrdpdev.c @@ -531,6 +531,9 @@ rdpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) /* glyphs */ dev->Glyphs = ps->Glyphs; ps->Glyphs = rdpGlyphs; + + dev->Trapezoids = ps->Trapezoids; + ps->Trapezoids = rdpTrapezoids; } RegisterBlockAndWakeupHandlers(rdpBlockHandler1, rdpWakeupHandler1, pScreen); |