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/server/module/rdpComposite.c | |
parent | f39ba98a4ff48a2e6a12cb27027a0b06d139c55a (diff) | |
download | xrdp-proprietary-03e5b5e62bae5f872874869e62cc096c576fba16.tar.gz xrdp-proprietary-03e5b5e62bae5f872874869e62cc096c576fba16.zip |
xorg: work on xorg driver
Diffstat (limited to 'xorg/server/module/rdpComposite.c')
-rw-r--r-- | xorg/server/module/rdpComposite.c | 97 |
1 files changed, 95 insertions, 2 deletions
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; + } +} |