summaryrefslogtreecommitdiffstats
path: root/xorg/server/module/rdpCopyPlane.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg/server/module/rdpCopyPlane.c')
-rw-r--r--xorg/server/module/rdpCopyPlane.c57
1 files changed, 7 insertions, 50 deletions
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;
}