diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2014-01-24 10:00:52 -0800 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2014-01-24 10:00:52 -0800 |
commit | f39ba98a4ff48a2e6a12cb27027a0b06d139c55a (patch) | |
tree | 56706101981867986ea9c4b1f1ee0d78e15588ed /xorg/server/module/rdpPolyPoint.c | |
parent | 320ce8ba47d3d7c344b5de84844d1fa90e346fde (diff) | |
download | xrdp-proprietary-f39ba98a4ff48a2e6a12cb27027a0b06d139c55a.tar.gz xrdp-proprietary-f39ba98a4ff48a2e6a12cb27027a0b06d139c55a.zip |
xorg: work on xorg driver
Diffstat (limited to 'xorg/server/module/rdpPolyPoint.c')
-rw-r--r-- | xorg/server/module/rdpPolyPoint.c | 70 |
1 files changed, 69 insertions, 1 deletions
diff --git a/xorg/server/module/rdpPolyPoint.c b/xorg/server/module/rdpPolyPoint.c index afe94a34..dafeb9bb 100644 --- a/xorg/server/module/rdpPolyPoint.c +++ b/xorg/server/module/rdpPolyPoint.c @@ -32,13 +32,24 @@ 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 +static void +rdpPolyPointPre(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, int mode, + int npt, DDXPointPtr in_pts, RegionPtr reg) +{ +} + +/******************************************************************************/ +static void rdpPolyPointOrg(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr in_pts) { @@ -50,11 +61,68 @@ rdpPolyPointOrg(DrawablePtr pDrawable, GCPtr pGC, int mode, } /******************************************************************************/ +static void +rdpPolyPointPost(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDrawable, GCPtr pGC, int mode, + int npt, DDXPointPtr in_pts, RegionPtr reg) +{ + if (cd == XRDP_CD_NODRAW) + { + return; + } + if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable)) + { + return; + } + if (cd == XRDP_CD_CLIP) + { + rdpRegionIntersect(reg, clip_reg, reg); + } + rdpClientConAddDirtyScreenReg(dev, clientCon, reg); +} + +/******************************************************************************/ void rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr in_pts) { + rdpPtr dev; + rdpClientCon *clientCon; + RegionRec clip_reg; + RegionRec reg; + int cd; + LLOGLN(0, ("rdpPolyPoint:")); + dev = rdpGetDevFromScreen(pGC->pScreen); + dev->counts.rdpPolyPointCallCount++; + + rdpRegionInit(®, NullBox, 0); + /* TODO */ + + rdpRegionInit(&clip_reg, NullBox, 0); + cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC); + LLOGLN(10, ("rdpPolyPoint: cd %d", cd)); + + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpPolyPointPre(dev, clientCon, cd, &clip_reg, pDrawable, + pGC, mode, npt, in_pts, ®); + clientCon = clientCon->next; + } + /* do original call */ rdpPolyPointOrg(pDrawable, pGC, mode, npt, in_pts); + + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpPolyPointPost(dev, clientCon, cd, &clip_reg, pDrawable, + pGC, mode, npt, in_pts, ®); + clientCon = clientCon->next; + } + + rdpRegionUninit(&clip_reg); + rdpRegionUninit(®); } |