summaryrefslogtreecommitdiffstats
path: root/xorg/server/module
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2014-01-28 10:41:32 -0800
committerJay Sorg <jay.sorg@gmail.com>2014-01-28 10:41:32 -0800
commit6beb2364f38f5e53b0acb744ffc8225c9c13e492 (patch)
treef3686148be0a7a912c039a57e1e284c6250e43d3 /xorg/server/module
parent022c1e31f9f9cee15d7264fb0f520c1a795b73ef (diff)
downloadxrdp-proprietary-6beb2364f38f5e53b0acb744ffc8225c9c13e492.tar.gz
xrdp-proprietary-6beb2364f38f5e53b0acb744ffc8225c9c13e492.zip
xorg: work on xorg driver
Diffstat (limited to 'xorg/server/module')
-rw-r--r--xorg/server/module/rdpClientCon.c42
-rw-r--r--xorg/server/module/rdpClientCon.h5
-rw-r--r--xorg/server/module/rdpComposite.c58
-rw-r--r--xorg/server/module/rdpCopyArea.c53
-rw-r--r--xorg/server/module/rdpCopyPlane.c57
-rw-r--r--xorg/server/module/rdpDraw.c36
-rw-r--r--xorg/server/module/rdpFillPolygon.c55
-rw-r--r--xorg/server/module/rdpImageGlyphBlt.c57
-rw-r--r--xorg/server/module/rdpImageText16.c55
-rw-r--r--xorg/server/module/rdpImageText8.c55
-rw-r--r--xorg/server/module/rdpPolyArc.c44
-rw-r--r--xorg/server/module/rdpPolyFillArc.c49
-rw-r--r--xorg/server/module/rdpPolyFillRect.c46
-rw-r--r--xorg/server/module/rdpPolyGlyphBlt.c25
-rw-r--r--xorg/server/module/rdpPolyPoint.c52
-rw-r--r--xorg/server/module/rdpPolyRectangle.c56
-rw-r--r--xorg/server/module/rdpPolySegment.c52
-rw-r--r--xorg/server/module/rdpPolyText16.c55
-rw-r--r--xorg/server/module/rdpPolyText8.c55
-rw-r--r--xorg/server/module/rdpPolylines.c50
-rw-r--r--xorg/server/module/rdpPutImage.c64
-rw-r--r--xorg/server/module/rdpTrapezoids.c56
22 files changed, 194 insertions, 883 deletions
diff --git a/xorg/server/module/rdpClientCon.c b/xorg/server/module/rdpClientCon.c
index 922e1e8e..c02e9f1e 100644
--- a/xorg/server/module/rdpClientCon.c
+++ b/xorg/server/module/rdpClientCon.c
@@ -2076,3 +2076,45 @@ rdpClientConSendArea(rdpPtr dev, rdpClientCon *clientCon,
}
}
}
+
+/******************************************************************************/
+int
+rdpClientConAddAllReg(rdpPtr dev, RegionPtr reg, DrawablePtr pDrawable)
+{
+ rdpClientCon *clientCon;
+ Bool drw_is_vis;
+
+ drw_is_vis = XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable);
+ if (!drw_is_vis)
+ {
+ return 0;
+ }
+ clientCon = dev->clientConHead;
+ while (clientCon != NULL)
+ {
+ rdpClientConAddDirtyScreenReg(dev, clientCon, reg);
+ clientCon = clientCon->next;
+ }
+ return 0;
+}
+
+/******************************************************************************/
+int
+rdpClientConAddAllBox(rdpPtr dev, BoxPtr box, DrawablePtr pDrawable)
+{
+ rdpClientCon *clientCon;
+ Bool drw_is_vis;
+
+ drw_is_vis = XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable);
+ if (!drw_is_vis)
+ {
+ return 0;
+ }
+ clientCon = dev->clientConHead;
+ while (clientCon != NULL)
+ {
+ rdpClientConAddDirtyScreenBox(dev, clientCon, box);
+ clientCon = clientCon->next;
+ }
+ return 0;
+}
diff --git a/xorg/server/module/rdpClientCon.h b/xorg/server/module/rdpClientCon.h
index 23f51378..592e8d31 100644
--- a/xorg/server/module/rdpClientCon.h
+++ b/xorg/server/module/rdpClientCon.h
@@ -143,6 +143,9 @@ rdpClientConAddDirtyScreenBox(rdpPtr dev, rdpClientCon *clientCon,
int
rdpClientConAddDirtyScreen(rdpPtr dev, rdpClientCon *clientCon,
int x, int y, int cx, int cy);
-
+int
+rdpClientConAddAllReg(rdpPtr dev, RegionPtr reg, DrawablePtr pDrawable);
+int
+rdpClientConAddAllBox(rdpPtr dev, BoxPtr box, DrawablePtr pDrawable);
#endif
diff --git a/xorg/server/module/rdpComposite.c b/xorg/server/module/rdpComposite.c
index 7ac6a084..7535d6c3 100644
--- a/xorg/server/module/rdpComposite.c
+++ b/xorg/server/module/rdpComposite.c
@@ -48,17 +48,6 @@ composite(alpha blending) calls
/******************************************************************************/
static void
-rdpCompositePre(rdpPtr dev, rdpClientCon *clientCon,
- PictureScreenPtr ps, CARD8 op, PicturePtr pSrc,
- PicturePtr pMask, PicturePtr pDst,
- INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
- INT16 xDst, INT16 yDst, CARD16 width, CARD16 height,
- BoxPtr box)
-{
-}
-
-/******************************************************************************/
-static void
rdpCompositeOrg(PictureScreenPtr ps, rdpPtr dev,
CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
@@ -71,30 +60,6 @@ rdpCompositeOrg(PictureScreenPtr ps, rdpPtr dev,
}
/******************************************************************************/
-static void
-rdpCompositePost(rdpPtr dev, rdpClientCon *clientCon,
- PictureScreenPtr ps, CARD8 op, PicturePtr pSrc,
- PicturePtr pMask, PicturePtr pDst,
- INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
- INT16 xDst, INT16 yDst, CARD16 width, CARD16 height,
- BoxPtr box)
-{
- RegionRec reg;
-
- if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDst->pDrawable))
- {
- return;
- }
- rdpRegionInit(&reg, box, 0);
- if (pDst->pCompositeClip != 0)
- {
- rdpRegionIntersect(&reg, pDst->pCompositeClip, &reg);
- }
- rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
- rdpRegionUninit(&reg);
-}
-
-/******************************************************************************/
void
rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst,
@@ -102,9 +67,9 @@ rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
{
ScreenPtr pScreen;
rdpPtr dev;
- rdpClientCon *clientCon;
PictureScreenPtr ps;
BoxRec box;
+ RegionRec reg;
LLOGLN(10, ("rdpComposite:"));
pScreen = pDst->pDrawable->pScreen;
@@ -114,24 +79,15 @@ rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
box.y1 = yDst + pDst->pDrawable->y;
box.x2 = box.x1 + width;
box.y2 = box.y1 + height;
- ps = GetPictureScreen(pScreen);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ rdpRegionInit(&reg, &box, 0);
+ if (pDst->pCompositeClip != NULL)
{
- rdpCompositePre(dev, clientCon, ps, op, pSrc, pMask, pDst,
- xSrc, ySrc, xMask, yMask, xDst, yDst,
- width, height, &box);
- clientCon = clientCon->next;
+ rdpRegionIntersect(&reg, pDst->pCompositeClip, &reg);
}
+ ps = GetPictureScreen(pScreen);
/* do original call */
rdpCompositeOrg(ps, dev, op, pSrc, pMask, pDst, xSrc, ySrc,
xMask, yMask, xDst, yDst, width, height);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
- {
- rdpCompositePost(dev, clientCon, ps, op, pSrc, pMask, pDst,
- xSrc, ySrc, xMask, yMask, xDst, yDst,
- width, height, &box);
- clientCon = clientCon->next;
- }
+ rdpClientConAddAllReg(dev, &reg, pDst->pDrawable);
+ rdpRegionUninit(&reg);
}
diff --git a/xorg/server/module/rdpCopyArea.c b/xorg/server/module/rdpCopyArea.c
index 48a54b99..708891f6 100644
--- a/xorg/server/module/rdpCopyArea.c
+++ b/xorg/server/module/rdpCopyArea.c
@@ -40,16 +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)
/******************************************************************************/
-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,
- RegionPtr reg)
-{
-}
-
-/******************************************************************************/
static RegionPtr
rdpCopyAreaOrg(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
int srcx, int srcy, int w, int h, int dstx, int dsty)
@@ -64,68 +54,37 @@ rdpCopyAreaOrg(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
}
/******************************************************************************/
-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,
- RegionPtr reg)
-{
-
- if (cd == XRDP_CD_NODRAW)
- {
- return;
- }
- if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDst))
- {
- return;
- }
- rdpClientConAddDirtyScreenReg(dev, clientCon, reg);
-}
-
-/******************************************************************************/
RegionPtr
rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
int srcx, int srcy, int w, int h, int dstx, int dsty)
{
rdpPtr dev;
- rdpClientCon *clientCon;
RegionPtr rv;
RegionRec clip_reg;
+ RegionRec reg;
int cd;
BoxRec box;
- RegionRec reg;
LLOGLN(10, ("rdpCopyArea:"));
dev = rdpGetDevFromScreen(pGC->pScreen);
dev->counts.rdpCopyAreaCallCount++;
- 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(&reg, &box, 0);
+ rdpRegionInit(&clip_reg, NullBox, 0);
+ cd = rdpDrawGetClip(dev, &clip_reg, pDst, pGC);
+ LLOGLN(10, ("rdpCopyArea: cd %d", cd));
if (cd == XRDP_CD_CLIP)
{
rdpRegionIntersect(&reg, &clip_reg, &reg);
}
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
- {
- rdpCopyAreaPre(dev, clientCon, cd, &clip_reg, pSrc, pDst, pGC,
- srcx, srcy, w, h, dstx, dsty, &reg);
- clientCon = clientCon->next;
- }
/* do original call */
rv = rdpCopyAreaOrg(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd != XRDP_CD_NODRAW)
{
- rdpCopyAreaPost(dev, clientCon, cd, &clip_reg, pSrc, pDst, pGC,
- srcx, srcy, w, h, dstx, dsty, &reg);
- clientCon = clientCon->next;
+ rdpClientConAddAllReg(dev, &reg, pDst);
}
rdpRegionUninit(&clip_reg);
rdpRegionUninit(&reg);
diff --git a/xorg/server/module/rdpCopyPlane.c b/xorg/server/module/rdpCopyPlane.c
index 5783342a..9ccf4c0a 100644
--- a/xorg/server/module/rdpCopyPlane.c
+++ b/xorg/server/module/rdpCopyPlane.c
@@ -40,16 +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)
/******************************************************************************/
-static void
-rdpCopyPlanePre(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, unsigned long bitPlane, BoxPtr box)
-{
-}
-
-/******************************************************************************/
static RegionPtr
rdpCopyPlaneOrg(DrawablePtr pSrc, DrawablePtr pDst,
GCPtr pGC, int srcx, int srcy, int w, int h,
@@ -66,33 +56,6 @@ rdpCopyPlaneOrg(DrawablePtr pSrc, DrawablePtr pDst,
}
/******************************************************************************/
-static void
-rdpCopyPlanePost(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, unsigned long bitPlane, BoxPtr box)
-{
- RegionRec reg;
-
- if (cd == XRDP_CD_NODRAW)
- {
- return;
- }
- if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDst))
- {
- return;
- }
- rdpRegionInit(&reg, box, 0);
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(&reg, clip_reg, &reg);
- }
- rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
- rdpRegionUninit(&reg);
-}
-
-/******************************************************************************/
RegionPtr
rdpCopyPlane(DrawablePtr pSrc, DrawablePtr pDst,
GCPtr pGC, int srcx, int srcy, int w, int h,
@@ -100,8 +63,8 @@ rdpCopyPlane(DrawablePtr pSrc, DrawablePtr pDst,
{
RegionPtr rv;
rdpPtr dev;
- rdpClientCon *clientCon;
RegionRec clip_reg;
+ RegionRec reg;
int cd;
BoxRec box;
@@ -112,28 +75,22 @@ rdpCopyPlane(DrawablePtr pSrc, DrawablePtr pDst,
box.y1 = pDst->y + dsty;
box.x2 = box.x1 + w;
box.y2 = box.x1 + h;
+ rdpRegionInit(&reg, &box, 0);
rdpRegionInit(&clip_reg, NullBox, 0);
cd = rdpDrawGetClip(dev, &clip_reg, pDst, pGC);
LLOGLN(10, ("rdpCopyPlane: cd %d", cd));
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd == XRDP_CD_CLIP)
{
- rdpCopyPlanePre(dev, clientCon, cd, &clip_reg, pSrc, pDst,
- pGC, srcx, srcy, w, h,
- dstx, dsty, bitPlane, &box);
- clientCon = clientCon->next;
+ rdpRegionIntersect(&reg, &clip_reg, &reg);
}
/* do original call */
rv = rdpCopyPlaneOrg(pSrc, pDst, pGC, srcx, srcy, w, h,
dstx, dsty, bitPlane);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd != XRDP_CD_NODRAW)
{
- rdpCopyPlanePost(dev, clientCon, cd, &clip_reg, pSrc, pDst,
- pGC, srcx, srcy, w, h,
- dstx, dsty, bitPlane, &box);
- clientCon = clientCon->next;
+ rdpClientConAddAllReg(dev, &reg, pDst);
}
rdpRegionUninit(&clip_reg);
+ rdpRegionUninit(&reg);
return rv;
}
diff --git a/xorg/server/module/rdpDraw.c b/xorg/server/module/rdpDraw.c
index 5593ad2c..9d834500 100644
--- a/xorg/server/module/rdpDraw.c
+++ b/xorg/server/module/rdpDraw.c
@@ -289,7 +289,6 @@ rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion)
{
ScreenPtr pScreen;
rdpPtr dev;
- rdpClientCon *clientCon;
RegionRec reg;
RegionRec clip;
int dx;
@@ -297,7 +296,9 @@ rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion)
int num_clip_rects;
int num_reg_rects;
BoxPtr box;
+ BoxRec box1;
+ LLOGLN(10, ("rdpCopyWindow:"));
pScreen = pWin->drawable.pScreen;
dev = rdpGetDevFromScreen(pScreen);
dev->counts.rdpCopyWindowCallCount++;
@@ -318,30 +319,25 @@ rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion)
if ((num_clip_rects == 0) || (num_reg_rects == 0))
{
- rdpRegionUninit(&reg);
- rdpRegionUninit(&clip);
- return;
}
-
- if ((num_clip_rects > 16) && (num_reg_rects > 16))
+ else
{
- box = rdpRegionExtents(&reg);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if ((num_clip_rects > 16) || (num_reg_rects > 16))
{
- rdpClientConAddDirtyScreenBox(dev, clientCon, box);
- clientCon = clientCon->next;
+ LLOGLN(10, ("rdpCopyWindow: big list"));
+ box = rdpRegionExtents(&reg);
+ box1 = *box;
+ box1.x1 += dx;
+ box1.y1 += dy;
+ box1.x2 += dx;
+ box1.y2 += dy;
+ rdpClientConAddAllBox(dev, &box1, &(pWin->drawable));
}
- }
- else
- {
- rdpRegionTranslate(&reg, dx, dy);
- rdpRegionIntersect(&reg, &reg, &clip);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ else
{
- rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
- clientCon = clientCon->next;
+ rdpRegionTranslate(&reg, dx, dy);
+ rdpRegionIntersect(&reg, &reg, &clip);
+ rdpClientConAddAllReg(dev, &reg, &(pWin->drawable));
}
}
rdpRegionUninit(&reg);
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
@@ -41,16 +41,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/******************************************************************************/
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,
int shape, int mode, int count,
DDXPointPtr pPts)
@@ -64,40 +54,13 @@ rdpFillPolygonOrg(DrawablePtr pDrawable, GCPtr 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(&reg, box, 0);
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(&reg, clip_reg, &reg);
- }
- rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
- rdpRegionUninit(&reg);
-}
-
-/******************************************************************************/
-void
rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC,
int shape, int mode, int count,
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(&reg, &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(&reg, &clip_reg, &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, &reg, pDrawable);
}
rdpRegionUninit(&clip_reg);
+ rdpRegionUninit(&reg);
}
diff --git a/xorg/server/module/rdpImageGlyphBlt.c b/xorg/server/module/rdpImageGlyphBlt.c
index 5a5ceca2..74693fd9 100644
--- a/xorg/server/module/rdpImageGlyphBlt.c
+++ b/xorg/server/module/rdpImageGlyphBlt.c
@@ -41,17 +41,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/******************************************************************************/
static void
-rdpImageGlyphBltPre(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, unsigned int nglyph,
- CharInfoPtr *ppci, pointer pglyphBase,
- BoxPtr box)
-{
-}
-
-/******************************************************************************/
-static void
rdpImageGlyphBltOrg(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, unsigned int nglyph,
CharInfoPtr *ppci, pointer pglyphBase)
@@ -64,42 +53,14 @@ rdpImageGlyphBltOrg(DrawablePtr pDrawable, GCPtr pGC,
}
/******************************************************************************/
-static void
-rdpImageGlyphBltPost(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, unsigned int nglyph,
- CharInfoPtr *ppci, pointer pglyphBase,
- BoxPtr box)
-{
- RegionRec reg;
-
- if (cd == XRDP_CD_NODRAW)
- {
- return;
- }
- if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable))
- {
- return;
- }
- rdpRegionInit(&reg, box, 0);
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(&reg, clip_reg, &reg);
- }
- rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
- rdpRegionUninit(&reg);
-}
-
-/******************************************************************************/
void
rdpImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, unsigned int nglyph,
CharInfoPtr *ppci, pointer pglyphBase)
{
rdpPtr dev;
- rdpClientCon *clientCon;
RegionRec clip_reg;
+ RegionRec reg;
int cd;
BoxRec box;
@@ -107,24 +68,20 @@ rdpImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
dev = rdpGetDevFromScreen(pGC->pScreen);
dev->counts.rdpImageGlyphBltCallCount++;
GetTextBoundingBox(pDrawable, pGC->font, x, y, nglyph, &box);
+ rdpRegionInit(&reg, &box, 0);
rdpRegionInit(&clip_reg, NullBox, 0);
cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
LLOGLN(10, ("rdpImageGlyphBlt: cd %d", cd));
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd == XRDP_CD_CLIP)
{
- rdpImageGlyphBltPre(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
- x, y, nglyph, ppci, pglyphBase, &box);
- clientCon = clientCon->next;
+ rdpRegionIntersect(&reg, &clip_reg, &reg);
}
/* do original call */
rdpImageGlyphBltOrg(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd != XRDP_CD_NODRAW)
{
- rdpImageGlyphBltPost(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
- x, y, nglyph, ppci, pglyphBase, &box);
- clientCon = clientCon->next;
+ rdpClientConAddAllReg(dev, &reg, pDrawable);
}
rdpRegionUninit(&clip_reg);
+ rdpRegionUninit(&reg);
}
diff --git a/xorg/server/module/rdpImageText16.c b/xorg/server/module/rdpImageText16.c
index 43d8f184..7ad8012b 100644
--- a/xorg/server/module/rdpImageText16.c
+++ b/xorg/server/module/rdpImageText16.c
@@ -41,16 +41,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/******************************************************************************/
static void
-rdpImageText16Pre(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, unsigned short *chars,
- BoxPtr box)
-{
-}
-
-/******************************************************************************/
-static void
rdpImageText16Org(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, unsigned short *chars)
{
@@ -62,40 +52,13 @@ rdpImageText16Org(DrawablePtr pDrawable, GCPtr pGC,
}
/******************************************************************************/
-static void
-rdpImageText16Post(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, unsigned short *chars,
- BoxPtr box)
-{
- RegionRec reg;
-
- if (cd == XRDP_CD_NODRAW)
- {
- return;
- }
- if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable))
- {
- return;
- }
- rdpRegionInit(&reg, box, 0);
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(&reg, clip_reg, &reg);
- }
- rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
- rdpRegionUninit(&reg);
-}
-
-/******************************************************************************/
void
rdpImageText16(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, unsigned short *chars)
{
rdpPtr dev;
- rdpClientCon *clientCon;
RegionRec clip_reg;
+ RegionRec reg;
int cd;
BoxRec box;
@@ -103,24 +66,20 @@ rdpImageText16(DrawablePtr pDrawable, GCPtr pGC,
dev = rdpGetDevFromScreen(pGC->pScreen);
dev->counts.rdpImageText16CallCount++;
GetTextBoundingBox(pDrawable, pGC->font, x, y, count, &box);
+ rdpRegionInit(&reg, &box, 0);
rdpRegionInit(&clip_reg, NullBox, 0);
cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
LLOGLN(10, ("rdpImageText16: cd %d", cd));
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd == XRDP_CD_CLIP)
{
- rdpImageText16Pre(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
- x, y, count, chars, &box);
- clientCon = clientCon->next;
+ rdpRegionIntersect(&reg, &clip_reg, &reg);
}
/* do original call */
rdpImageText16Org(pDrawable, pGC, x, y, count, chars);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd != XRDP_CD_NODRAW)
{
- rdpImageText16Post(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
- x, y, count, chars, &box);
- clientCon = clientCon->next;
+ rdpClientConAddAllReg(dev, &reg, pDrawable);
}
rdpRegionUninit(&clip_reg);
+ rdpRegionUninit(&reg);
}
diff --git a/xorg/server/module/rdpImageText8.c b/xorg/server/module/rdpImageText8.c
index 3b48cfa4..abcfbff0 100644
--- a/xorg/server/module/rdpImageText8.c
+++ b/xorg/server/module/rdpImageText8.c
@@ -41,16 +41,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/******************************************************************************/
static void
-rdpImageText8Pre(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, char *chars,
- BoxPtr box)
-{
-}
-
-/******************************************************************************/
-static void
rdpImageText8Org(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, char *chars)
{
@@ -62,40 +52,13 @@ rdpImageText8Org(DrawablePtr pDrawable, GCPtr pGC,
}
/******************************************************************************/
-static void
-rdpImageText8Post(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, char *chars,
- BoxPtr box)
-{
- RegionRec reg;
-
- if (cd == XRDP_CD_NODRAW)
- {
- return;
- }
- if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable))
- {
- return;
- }
- rdpRegionInit(&reg, box, 0);
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(&reg, clip_reg, &reg);
- }
- rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
- rdpRegionUninit(&reg);
-}
-
-/******************************************************************************/
void
rdpImageText8(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, char *chars)
{
rdpPtr dev;
- rdpClientCon *clientCon;
RegionRec clip_reg;
+ RegionRec reg;
int cd;
BoxRec box;
@@ -103,24 +66,20 @@ rdpImageText8(DrawablePtr pDrawable, GCPtr pGC,
dev = rdpGetDevFromScreen(pGC->pScreen);
dev->counts.rdpImageText8CallCount++;
GetTextBoundingBox(pDrawable, pGC->font, x, y, count, &box);
+ rdpRegionInit(&reg, &box, 0);
rdpRegionInit(&clip_reg, NullBox, 0);
cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
LLOGLN(10, ("rdpImageText8: cd %d", cd));
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd == XRDP_CD_CLIP)
{
- rdpImageText8Pre(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
- x, y, count, chars, &box);
- clientCon = clientCon->next;
+ rdpRegionIntersect(&reg, &clip_reg, &reg);
}
/* do original call */
rdpImageText8Org(pDrawable, pGC, x, y, count, chars);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd != XRDP_CD_NODRAW)
{
- rdpImageText8Post(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
- x, y, count, chars, &box);
- clientCon = clientCon->next;
+ rdpClientConAddAllReg(dev, &reg, pDrawable);
}
rdpRegionUninit(&clip_reg);
+ rdpRegionUninit(&reg);
}
diff --git a/xorg/server/module/rdpPolyArc.c b/xorg/server/module/rdpPolyArc.c
index e0a3d128..9a701dd8 100644
--- a/xorg/server/module/rdpPolyArc.c
+++ b/xorg/server/module/rdpPolyArc.c
@@ -41,15 +41,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/******************************************************************************/
static void
-rdpPolyArcPre(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs,
- RegionPtr reg)
-{
-}
-
-/******************************************************************************/
-static void
rdpPolyArcOrg(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
{
GC_OP_VARS;
@@ -60,29 +51,10 @@ rdpPolyArcOrg(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
}
/******************************************************************************/
-static void
-rdpPolyArcPost(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs,
- RegionPtr reg)
-{
- if (cd == XRDP_CD_NODRAW)
- {
- return;
- }
- if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable))
- {
- return;
- }
- rdpClientConAddDirtyScreenReg(dev, clientCon, reg);
-}
-
-/******************************************************************************/
void
rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
{
rdpPtr dev;
- rdpClientCon *clientCon;
BoxRec box;
int index;
int cd;
@@ -119,22 +91,12 @@ rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
{
rdpRegionIntersect(&reg, &clip_reg, &reg);
}
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
- {
- rdpPolyArcPre(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
- narcs, parcs, &reg);
- clientCon = clientCon->next;
- }
/* do original call */
rdpPolyArcOrg(pDrawable, pGC, narcs, parcs);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd != XRDP_CD_NODRAW)
{
- rdpPolyArcPost(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
- narcs, parcs, &reg);
- clientCon = clientCon->next;
+ rdpClientConAddAllReg(dev, &reg, pDrawable);
}
- rdpRegionUninit(&reg);
rdpRegionUninit(&clip_reg);
+ rdpRegionUninit(&reg);
}
diff --git a/xorg/server/module/rdpPolyFillArc.c b/xorg/server/module/rdpPolyFillArc.c
index 4bb12746..437929ae 100644
--- a/xorg/server/module/rdpPolyFillArc.c
+++ b/xorg/server/module/rdpPolyFillArc.c
@@ -41,15 +41,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/******************************************************************************/
static void
-rdpPolyFillArcPre(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs,
- RegionPtr reg)
-{
-}
-
-/******************************************************************************/
-static void
rdpPolyFillArcOrg(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
{
GC_OP_VARS;
@@ -60,33 +51,10 @@ rdpPolyFillArcOrg(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
}
/******************************************************************************/
-static void
-rdpPolyFillArcPost(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs,
- 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
rdpPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
{
rdpPtr dev;
- rdpClientCon *clientCon;
BoxRec box;
int index;
int cd;
@@ -119,23 +87,16 @@ rdpPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
rdpRegionInit(&clip_reg, NullBox, 0);
cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
LLOGLN(10, ("rdpPolyFillArc: cd %d", cd));
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd == XRDP_CD_CLIP)
{
- rdpPolyFillArcPre(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
- narcs, parcs, &reg);
- clientCon = clientCon->next;
+ rdpRegionIntersect(&reg, &clip_reg, &reg);
}
-
/* do original call */
rdpPolyFillArcOrg(pDrawable, pGC, narcs, parcs);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd != XRDP_CD_NODRAW)
{
- rdpPolyFillArcPost(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
- narcs, parcs, &reg);
- clientCon = clientCon->next;
+ rdpClientConAddAllReg(dev, &reg, pDrawable);
}
- rdpRegionUninit(&reg);
rdpRegionUninit(&clip_reg);
+ rdpRegionUninit(&reg);
}
diff --git a/xorg/server/module/rdpPolyFillRect.c b/xorg/server/module/rdpPolyFillRect.c
index a3162d31..f61202b2 100644
--- a/xorg/server/module/rdpPolyFillRect.c
+++ b/xorg/server/module/rdpPolyFillRect.c
@@ -41,16 +41,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/******************************************************************************/
static void
-rdpPolyFillRectPre(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDrawable, GCPtr pGC,
- int nrectFill, xRectangle *prectInit,
- RegionPtr reg)
-{
-}
-
-/******************************************************************************/
-static void
rdpPolyFillRectOrg(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
xRectangle *prectInit)
{
@@ -62,31 +52,11 @@ rdpPolyFillRectOrg(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
}
/******************************************************************************/
-static void
-rdpPolyFillRectPost(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDrawable, GCPtr pGC,
- int nrectFill, xRectangle *prectInit,
- RegionPtr reg)
-{
- if (cd == XRDP_CD_NODRAW)
- {
- return;
- }
- if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable))
- {
- return;
- }
- rdpClientConAddDirtyScreenReg(dev, clientCon, reg);
-}
-
-/******************************************************************************/
void
rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
xRectangle *prectInit)
{
rdpPtr dev;
- rdpClientCon *clientCon;
RegionRec clip_reg;
RegionPtr reg;
int cd;
@@ -99,26 +69,16 @@ 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);
+ LLOGLN(10, ("rdpPolyFillRect: cd %d", cd));
if (cd == XRDP_CD_CLIP)
{
rdpRegionIntersect(reg, &clip_reg, reg);
}
- LLOGLN(10, ("rdpPolyFillRect: cd %d", cd));
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
- {
- rdpPolyFillRectPre(dev, clientCon, cd, &clip_reg, pDrawable,
- pGC, nrectFill, prectInit, reg);
- clientCon = clientCon->next;
- }
/* do original call */
rdpPolyFillRectOrg(pDrawable, pGC, nrectFill, prectInit);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd != XRDP_CD_NODRAW)
{
- rdpPolyFillRectPost(dev, clientCon, cd, &clip_reg, pDrawable,
- pGC, nrectFill, prectInit, reg);
- clientCon = clientCon->next;
+ rdpClientConAddAllReg(dev, reg, pDrawable);
}
rdpRegionUninit(&clip_reg);
rdpRegionDestroy(reg);
diff --git a/xorg/server/module/rdpPolyGlyphBlt.c b/xorg/server/module/rdpPolyGlyphBlt.c
index 7801a15e..e43e676b 100644
--- a/xorg/server/module/rdpPolyGlyphBlt.c
+++ b/xorg/server/module/rdpPolyGlyphBlt.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) \
@@ -56,7 +58,30 @@ rdpPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, unsigned int nglyph,
CharInfoPtr *ppci, pointer pglyphBase)
{
+ rdpPtr dev;
+ RegionRec clip_reg;
+ RegionRec reg;
+ int cd;
+ BoxRec box;
+
LLOGLN(0, ("rdpPolyGlyphBlt:"));
+ dev = rdpGetDevFromScreen(pGC->pScreen);
+ dev->counts.rdpPolyGlyphBltCallCount++;
+ GetTextBoundingBox(pDrawable, pGC->font, x, y, nglyph, &box);
+ rdpRegionInit(&reg, &box, 0);
+ rdpRegionInit(&clip_reg, NullBox, 0);
+ cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
+ LLOGLN(10, ("rdpPolyGlyphBlt: cd %d", cd));
+ if (cd == XRDP_CD_CLIP)
+ {
+ rdpRegionIntersect(&reg, &clip_reg, &reg);
+ }
/* do original call */
rdpPolyGlyphBltOrg(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
+ if (cd != XRDP_CD_NODRAW)
+ {
+ rdpClientConAddAllReg(dev, &reg, pDrawable);
+ }
+ rdpRegionUninit(&clip_reg);
+ rdpRegionUninit(&reg);
}
diff --git a/xorg/server/module/rdpPolyPoint.c b/xorg/server/module/rdpPolyPoint.c
index df151b84..5dfac5ef 100644
--- a/xorg/server/module/rdpPolyPoint.c
+++ b/xorg/server/module/rdpPolyPoint.c
@@ -41,15 +41,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/******************************************************************************/
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)
{
@@ -61,45 +52,18 @@ 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)
-{
- 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
rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode,
int npt, DDXPointPtr in_pts)
{
rdpPtr dev;
- rdpClientCon *clientCon;
RegionRec clip_reg;
RegionRec reg;
int cd;
int index;
BoxRec box;
- LLOGLN(0, ("rdpPolyPoint:"));
+ LLOGLN(10, ("rdpPolyPoint:"));
dev = rdpGetDevFromScreen(pGC->pScreen);
dev->counts.rdpPolyPointCallCount++;
rdpRegionInit(&reg, NullBox, 0);
@@ -114,21 +78,15 @@ rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode,
rdpRegionInit(&clip_reg, NullBox, 0);
cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
LLOGLN(10, ("rdpPolyPoint: cd %d", cd));
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd == XRDP_CD_CLIP)
{
- rdpPolyPointPre(dev, clientCon, cd, &clip_reg, pDrawable,
- pGC, mode, npt, in_pts, &reg);
- clientCon = clientCon->next;
+ rdpRegionIntersect(&reg, &clip_reg, &reg);
}
/* do original call */
rdpPolyPointOrg(pDrawable, pGC, mode, npt, in_pts);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd != XRDP_CD_NODRAW)
{
- rdpPolyPointPost(dev, clientCon, cd, &clip_reg, pDrawable,
- pGC, mode, npt, in_pts, &reg);
- clientCon = clientCon->next;
+ rdpClientConAddAllReg(dev, &reg, pDrawable);
}
rdpRegionUninit(&clip_reg);
rdpRegionUninit(&reg);
diff --git a/xorg/server/module/rdpPolyRectangle.c b/xorg/server/module/rdpPolyRectangle.c
index ca7b7903..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,33 +53,10 @@ 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;
@@ -116,63 +84,49 @@ rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects,
index = 0;
while (index < nrects)
{
-
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(&reg, &box);
-
/* left */
box.x1 = x1 - up;
box.y1 = y1 - up;
box.x2 = x1 + down;
box.y2 = y2 + down;
rdpRegionUnionRect(&reg, &box);
-
/* right */
box.x1 = x2 - up;
box.y1 = y1 - up;
box.x2 = x2 + down;
box.y2 = y2 + down;
rdpRegionUnionRect(&reg, &box);
-
/* bottom */
box.x1 = x1 - up;
box.y1 = y2 - up;
box.x2 = x2 + down;
box.y2 = y2 + down;
rdpRegionUnionRect(&reg, &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, &reg);
- clientCon = clientCon->next;
+ rdpRegionIntersect(&reg, &clip_reg, &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, &reg);
- clientCon = clientCon->next;
+ rdpClientConAddAllReg(dev, &reg, pDrawable);
}
- rdpRegionUninit(&reg);
rdpRegionUninit(&clip_reg);
+ rdpRegionUninit(&reg);
}
diff --git a/xorg/server/module/rdpPolySegment.c b/xorg/server/module/rdpPolySegment.c
index d242f736..98e4eb1f 100644
--- a/xorg/server/module/rdpPolySegment.c
+++ b/xorg/server/module/rdpPolySegment.c
@@ -41,15 +41,6 @@ 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;
@@ -61,36 +52,9 @@ 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)
{
rdpPtr dev;
- rdpClientCon *clientCon;
RegionRec clip_reg;
RegionRec reg;
int cd;
@@ -120,24 +84,16 @@ rdpPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs)
rdpRegionInit(&clip_reg, NullBox, 0);
cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
LLOGLN(10, ("rdpPolySegment: cd %d", cd));
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd == XRDP_CD_CLIP)
{
- rdpPolySegmentPre(dev, clientCon, cd, &clip_reg, pDrawable,
- pGC, nseg, pSegs, &reg);
- clientCon = clientCon->next;
+ rdpRegionIntersect(&reg, &clip_reg, &reg);
}
/* do original call */
rdpPolySegmentOrg(pDrawable, pGC, nseg, pSegs);
-
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd != XRDP_CD_NODRAW)
{
- rdpPolySegmentPost(dev, clientCon, cd, &clip_reg, pDrawable,
- pGC, nseg, pSegs, &reg);
- clientCon = clientCon->next;
+ rdpClientConAddAllReg(dev, &reg, pDrawable);
}
rdpRegionUninit(&clip_reg);
rdpRegionUninit(&reg);
-
}
diff --git a/xorg/server/module/rdpPolyText16.c b/xorg/server/module/rdpPolyText16.c
index 4284a3dd..90d68a8c 100644
--- a/xorg/server/module/rdpPolyText16.c
+++ b/xorg/server/module/rdpPolyText16.c
@@ -40,16 +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)
/******************************************************************************/
-static void
-rdpPolyText16Pre(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, unsigned short *chars,
- BoxPtr box)
-{
-}
-
-/******************************************************************************/
static int
rdpPolyText16Org(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, unsigned short *chars)
@@ -64,41 +54,14 @@ rdpPolyText16Org(DrawablePtr pDrawable, GCPtr pGC,
}
/******************************************************************************/
-static void
-rdpPolyText16Post(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, unsigned short *chars,
- BoxPtr box)
-{
- RegionRec reg;
-
- if (cd == XRDP_CD_NODRAW)
- {
- return;
- }
- if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable))
- {
- return;
- }
- rdpRegionInit(&reg, box, 0);
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(&reg, clip_reg, &reg);
- }
- rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
- rdpRegionUninit(&reg);
-}
-
-/******************************************************************************/
int
rdpPolyText16(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, unsigned short *chars)
{
int rv;
rdpPtr dev;
- rdpClientCon *clientCon;
RegionRec clip_reg;
+ RegionRec reg;
int cd;
BoxRec box;
@@ -106,25 +69,21 @@ rdpPolyText16(DrawablePtr pDrawable, GCPtr pGC,
dev = rdpGetDevFromScreen(pGC->pScreen);
dev->counts.rdpPolyText16CallCount++;
GetTextBoundingBox(pDrawable, pGC->font, x, y, count, &box);
+ rdpRegionInit(&reg, &box, 0);
rdpRegionInit(&clip_reg, NullBox, 0);
cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
LLOGLN(10, ("rdpPolyText16: cd %d", cd));
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd == XRDP_CD_CLIP)
{
- rdpPolyText16Pre(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
- x, y, count, chars, &box);
- clientCon = clientCon->next;
+ rdpRegionIntersect(&reg, &clip_reg, &reg);
}
/* do original call */
rv = rdpPolyText16Org(pDrawable, pGC, x, y, count, chars);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd != XRDP_CD_NODRAW)
{
- rdpPolyText16Post(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
- x, y, count, chars, &box);
- clientCon = clientCon->next;
+ rdpClientConAddAllReg(dev, &reg, pDrawable);
}
rdpRegionUninit(&clip_reg);
+ rdpRegionUninit(&reg);
return rv;
}
diff --git a/xorg/server/module/rdpPolyText8.c b/xorg/server/module/rdpPolyText8.c
index 52873a65..630bc04e 100644
--- a/xorg/server/module/rdpPolyText8.c
+++ b/xorg/server/module/rdpPolyText8.c
@@ -40,16 +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)
/******************************************************************************/
-static void
-rdpPolyText8Pre(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, char *chars,
- BoxPtr box)
-{
-}
-
-/******************************************************************************/
static int
rdpPolyText8Org(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, char *chars)
@@ -64,41 +54,14 @@ rdpPolyText8Org(DrawablePtr pDrawable, GCPtr pGC,
}
/******************************************************************************/
-static void
-rdpPolyText8Post(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, char *chars,
- BoxPtr box)
-{
- RegionRec reg;
-
- if (cd == XRDP_CD_NODRAW)
- {
- return;
- }
- if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable))
- {
- return;
- }
- rdpRegionInit(&reg, box, 0);
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(&reg, clip_reg, &reg);
- }
- rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
- rdpRegionUninit(&reg);
-}
-
-/******************************************************************************/
int
rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, char *chars)
{
int rv;
rdpPtr dev;
- rdpClientCon *clientCon;
RegionRec clip_reg;
+ RegionRec reg;
int cd;
BoxRec box;
@@ -106,25 +69,21 @@ rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
dev = rdpGetDevFromScreen(pGC->pScreen);
dev->counts.rdpPolyText8CallCount++;
GetTextBoundingBox(pDrawable, pGC->font, x, y, count, &box);
+ rdpRegionInit(&reg, &box, 0);
rdpRegionInit(&clip_reg, NullBox, 0);
cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
LLOGLN(10, ("rdpPolyText8: cd %d", cd));
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd == XRDP_CD_CLIP)
{
- rdpPolyText8Pre(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
- x, y, count, chars, &box);
- clientCon = clientCon->next;
+ rdpRegionIntersect(&reg, &clip_reg, &reg);
}
/* do original call */
rv = rdpPolyText8Org(pDrawable, pGC, x, y, count, chars);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd != XRDP_CD_NODRAW)
{
- rdpPolyText8Post(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
- x, y, count, chars, &box);
- clientCon = clientCon->next;
+ rdpClientConAddAllReg(dev, &reg, pDrawable);
}
rdpRegionUninit(&clip_reg);
+ rdpRegionUninit(&reg);
return rv;
}
diff --git a/xorg/server/module/rdpPolylines.c b/xorg/server/module/rdpPolylines.c
index 630f2827..da979e9f 100644
--- a/xorg/server/module/rdpPolylines.c
+++ b/xorg/server/module/rdpPolylines.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
-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)
@@ -62,37 +53,10 @@ 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)
{
rdpPtr dev;
- rdpClientCon *clientCon;
RegionRec clip_reg;
RegionRec reg;
int cd;
@@ -122,21 +86,15 @@ rdpPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode,
rdpRegionInit(&clip_reg, NullBox, 0);
cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
LLOGLN(10, ("rdpPolylines: cd %d", cd));
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd == XRDP_CD_CLIP)
{
- rdpPolylinesPre(dev, clientCon, cd, &clip_reg, pDrawable,
- pGC, mode, npt, pptInit, &reg);
- clientCon = clientCon->next;
+ rdpRegionIntersect(&reg, &clip_reg, &reg);
}
/* do original call */
rdpPolylinesOrg(pDrawable, pGC, mode, npt, pptInit);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd != XRDP_CD_NODRAW)
{
- rdpPolylinesPost(dev, clientCon, cd, &clip_reg, pDrawable,
- pGC, mode, npt, pptInit, &reg);
- clientCon = clientCon->next;
+ rdpClientConAddAllReg(dev, &reg, pDrawable);
}
rdpRegionUninit(&clip_reg);
rdpRegionUninit(&reg);
diff --git a/xorg/server/module/rdpPutImage.c b/xorg/server/module/rdpPutImage.c
index f7af2882..b7134479 100644
--- a/xorg/server/module/rdpPutImage.c
+++ b/xorg/server/module/rdpPutImage.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
-rdpPutImagePre(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDst, GCPtr pGC, int depth, int x, int y,
- int w, int h, int leftPad, int format, char *pBits)
-{
-}
-
-/******************************************************************************/
static void
rdpPutImageOrg(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y,
int w, int h, int leftPad, int format, char *pBits)
@@ -63,67 +54,36 @@ rdpPutImageOrg(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y,
/******************************************************************************/
void
-rdpPutImagePost(rdpPtr dev, rdpClientCon *clientCon,
- int cd, RegionPtr clip_reg,
- DrawablePtr pDst, GCPtr pGC, int depth, int x, int y,
- int w, int h, int leftPad, int format, char *pBits)
-{
- BoxRec box;
- RegionRec reg;
-
- if (cd == XRDP_CD_NODRAW)
- {
- return;
- }
- if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDst))
- {
- return;
- }
- box.x1 = x + pDst->x;
- box.y1 = y + pDst->y;
- box.x2 = box.x1 + w;
- box.y2 = box.y1 + h;
- rdpRegionInit(&reg, &box, 0);
- if (cd == XRDP_CD_CLIP)
- {
- rdpRegionIntersect(&reg, clip_reg, &reg);
- }
- rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
- rdpRegionUninit(&reg);
-}
-
-/******************************************************************************/
-void
rdpPutImage(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y,
int w, int h, int leftPad, int format, char *pBits)
{
rdpPtr dev;
- rdpClientCon *clientCon;
RegionRec clip_reg;
+ RegionRec reg;
int cd;
+ BoxRec box;
LLOGLN(10, ("rdpPutImage:"));
dev = rdpGetDevFromScreen(pGC->pScreen);
dev->counts.rdpPutImageCallCount++;
+ box.x1 = x + pDst->x;
+ box.y1 = y + pDst->y;
+ box.x2 = box.x1 + w;
+ box.y2 = box.y1 + h;
+ rdpRegionInit(&reg, &box, 0);
rdpRegionInit(&clip_reg, NullBox, 0);
cd = rdpDrawGetClip(dev, &clip_reg, pDst, pGC);
LLOGLN(10, ("rdpPutImage: cd %d", cd));
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd == XRDP_CD_CLIP)
{
- rdpPutImagePre(dev, clientCon, cd, &clip_reg, pDst, pGC, depth, x, y,
- w, h, leftPad, format, pBits);
- clientCon = clientCon->next;
+ rdpRegionIntersect(&reg, &clip_reg, &reg);
}
-
/* do original call */
rdpPutImageOrg(pDst, pGC, depth, x, y, w, h, leftPad, format, pBits);
- clientCon = dev->clientConHead;
- while (clientCon != NULL)
+ if (cd != XRDP_CD_NODRAW)
{
- rdpPutImagePost(dev, clientCon, cd, &clip_reg, pDst, pGC, depth, x, y,
- w, h, leftPad, format, pBits);
- clientCon = clientCon->next;
+ rdpClientConAddAllReg(dev, &reg, pDst);
}
rdpRegionUninit(&clip_reg);
+ rdpRegionUninit(&reg);
}
diff --git a/xorg/server/module/rdpTrapezoids.c b/xorg/server/module/rdpTrapezoids.c
index 491f9030..05b34ec4 100644
--- a/xorg/server/module/rdpTrapezoids.c
+++ b/xorg/server/module/rdpTrapezoids.c
@@ -46,15 +46,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/******************************************************************************/
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,
@@ -66,28 +57,6 @@ rdpTrapezoidsOrg(PictureScreenPtr ps, rdpPtr dev,
}
/******************************************************************************/
-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(&reg, box, 0);
- if (pDst->pCompositeClip != 0)
- {
- rdpRegionIntersect(&reg, pDst->pCompositeClip, &reg);
- }
- rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
- rdpRegionUninit(&reg);
-}
-
-/******************************************************************************/
void
rdpTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
@@ -95,41 +64,24 @@ rdpTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
{
ScreenPtr pScreen;
rdpPtr dev;
- rdpClientCon *clientCon;
PictureScreenPtr ps;
BoxRec box;
- int dstx;
- int dsty;
+ RegionRec reg;
LLOGLN(10, ("rdpTrapezoids:"));
pScreen = pDst->pDrawable->pScreen;
dev = rdpGetDevFromScreen(pScreen);
dev->counts.rdpTrapezoidsCallCount++;
- dstx = traps[0].left.p1.x >> 16;
- dsty = traps[0].left.p1.y >> 16;
miTrapezoidBounds(ntrap, traps, &box);
box.x1 += pDst->pDrawable->x;
box.y1 += pDst->pDrawable->y;
box.x2 += pDst->pDrawable->x;
box.y2 += pDst->pDrawable->y;
- LLOGLN(10, ("%d %d %d %d %d %d", dstx, dsty, box.x1, box.y1,
- box.x2, box.y2));
+ rdpRegionInit(&reg, &box, 0);
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;
- }
+ rdpClientConAddAllReg(dev, &reg, pDst->pDrawable);
+ rdpRegionUninit(&reg);
}