diff options
| author | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2014-01-28 18:09:35 -0800 |
|---|---|---|
| committer | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2014-01-28 18:09:35 -0800 |
| commit | ec4791ac405b75f8ee84527c8fe51f8a7d69e9ca (patch) | |
| tree | 89ae0fe87fe10c556e7c25b3ea8ca431c1575602 /xorg/server/module/rdpPolyRectangle.c | |
| parent | c96dd8df2b4398ddbb8e931bdf673d43c4a77f51 (diff) | |
| parent | b4b73056fc8c119beb032d20fc763bc40af3efa9 (diff) | |
| download | xrdp-proprietary-ec4791ac405b75f8ee84527c8fe51f8a7d69e9ca.tar.gz xrdp-proprietary-ec4791ac405b75f8ee84527c8fe51f8a7d69e9ca.zip | |
Merge branch 'devel' of github.com:/neutrinolabs/xrdp into devel
Diffstat (limited to 'xorg/server/module/rdpPolyRectangle.c')
| -rw-r--r-- | xorg/server/module/rdpPolyRectangle.c | 99 |
1 files changed, 33 insertions, 66 deletions
diff --git a/xorg/server/module/rdpPolyRectangle.c b/xorg/server/module/rdpPolyRectangle.c index 304a8122..18311907 100644 --- a/xorg/server/module/rdpPolyRectangle.c +++ b/xorg/server/module/rdpPolyRectangle.c @@ -40,15 +40,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 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, xRectangle *rects) @@ -62,39 +53,20 @@ rdpPolyRectangleOrg(DrawablePtr pDrawable, GCPtr pGC, int nrects, /******************************************************************************/ void -rdpPolyRectanglePost(rdpPtr dev, rdpClientCon *clientCon, - int cd, RegionPtr clip_reg, - DrawablePtr pDrawable, GCPtr pGC, int nrects, - xRectangle *rects, 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 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; + int x1; + int y1; + int x2; + int y2; RegionRec clip_reg; RegionRec reg; @@ -112,54 +84,49 @@ rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects, 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; + x1 = rects[index].x + pDrawable->x; + y1 = rects[index].y + pDrawable->y; + x2 = x1 + rects[index].width; + y2 = y1 + rects[index].height; + /* top */ + box.x1 = x1 - up; + box.y1 = y1 - up; + box.x2 = x2 + down; + box.y2 = y1 + down; 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); + /* left */ + box.x1 = x1 - up; + box.y1 = y1 - up; + box.x2 = x1 + down; + box.y2 = y2 + 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); + /* right */ + box.x1 = x2 - up; + box.y1 = y1 - up; + box.x2 = x2 + down; + box.y2 = y2 + 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; + /* bottom */ + box.x1 = x1 - up; + box.y1 = y2 - up; + box.x2 = x2 + down; + box.y2 = y2 + down; 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) + if (cd == XRDP_CD_CLIP) { - rdpPolyRectanglePre(dev, clientCon, cd, &clip_reg, pDrawable, pGC, - nrects, rects, ®); - clientCon = clientCon->next; + rdpRegionIntersect(®, &clip_reg, ®); } /* do original call */ rdpPolyRectangleOrg(pDrawable, pGC, nrects, rects); - clientCon = dev->clientConHead; - while (clientCon != NULL) + if (cd != XRDP_CD_NODRAW) { - rdpPolyRectanglePost(dev, clientCon, cd, &clip_reg, pDrawable, pGC, - nrects, rects, ®); - clientCon = clientCon->next; + rdpClientConAddAllReg(dev, ®, pDrawable); } - rdpRegionUninit(®); rdpRegionUninit(&clip_reg); + rdpRegionUninit(®); } |
