From 6beb2364f38f5e53b0acb744ffc8225c9c13e492 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Tue, 28 Jan 2014 10:41:32 -0800 Subject: xorg: work on xorg driver --- xorg/server/module/rdpFillPolygon.c | 55 +++++-------------------------------- 1 file changed, 7 insertions(+), 48 deletions(-) (limited to 'xorg/server/module/rdpFillPolygon.c') diff --git a/xorg/server/module/rdpFillPolygon.c b/xorg/server/module/rdpFillPolygon.c index c97690d1..34fe4096 100644 --- a/xorg/server/module/rdpFillPolygon.c +++ b/xorg/server/module/rdpFillPolygon.c @@ -39,16 +39,6 @@ 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 -rdpFillPolygonPre(rdpPtr dev, rdpClientCon *clientCon, - int cd, RegionPtr clip_reg, - DrawablePtr pDrawable, GCPtr pGC, - int shape, int mode, int count, - DDXPointPtr pPts, BoxPtr box) -{ -} - /******************************************************************************/ void rdpFillPolygonOrg(DrawablePtr pDrawable, GCPtr pGC, @@ -62,33 +52,6 @@ rdpFillPolygonOrg(DrawablePtr pDrawable, GCPtr pGC, GC_OP_EPILOGUE(pGC); } -/******************************************************************************/ -void -rdpFillPolygonPost(rdpPtr dev, rdpClientCon *clientCon, - int cd, RegionPtr clip_reg, - DrawablePtr pDrawable, GCPtr pGC, - int shape, int mode, int count, - DDXPointPtr pPts, BoxPtr box) -{ - RegionRec reg; - - if (cd == XRDP_CD_NODRAW) - { - return; - } - if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable)) - { - return; - } - rdpRegionInit(®, box, 0); - if (cd == XRDP_CD_CLIP) - { - rdpRegionIntersect(®, clip_reg, ®); - } - rdpClientConAddDirtyScreenReg(dev, clientCon, ®); - rdpRegionUninit(®); -} - /******************************************************************************/ void rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC, @@ -96,8 +59,8 @@ rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC, DDXPointPtr pPts) { rdpPtr dev; - rdpClientCon *clientCon; RegionRec clip_reg; + RegionRec reg; int cd; int maxx; int maxy; @@ -135,24 +98,20 @@ rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC, box.x2 = pDrawable->x + maxx + 1; box.y2 = pDrawable->y + maxy + 1; } + rdpRegionInit(®, &box, 0); rdpRegionInit(&clip_reg, NullBox, 0); cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC); LLOGLN(10, ("rdpFillPolygon: cd %d", cd)); - clientCon = dev->clientConHead; - while (clientCon != NULL) + if (cd == XRDP_CD_CLIP) { - rdpFillPolygonPre(dev, clientCon, cd, &clip_reg, pDrawable, pGC, - shape, mode, count, pPts, &box); - clientCon = clientCon->next; + rdpRegionIntersect(®, &clip_reg, ®); } /* do original call */ rdpFillPolygonOrg(pDrawable, pGC, shape, mode, count, pPts); - clientCon = dev->clientConHead; - while (clientCon != NULL) + if (cd != XRDP_CD_NODRAW) { - rdpFillPolygonPost(dev, clientCon, cd, &clip_reg, pDrawable, pGC, - shape, mode, count, pPts, &box); - clientCon = clientCon->next; + rdpClientConAddAllReg(dev, ®, pDrawable); } rdpRegionUninit(&clip_reg); + rdpRegionUninit(®); } -- cgit v1.2.1