summaryrefslogtreecommitdiffstats
path: root/xorg/X11R7.6
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2013-07-27 17:20:19 -0700
committerJay Sorg <jay.sorg@gmail.com>2013-07-27 17:20:19 -0700
commitaf4dbdc75ae631b821d713917d8057b1f9c33266 (patch)
tree65cf175f7bca4b5a30358dc1ca4ba29e7b84fb6d /xorg/X11R7.6
parent48aa165729099cb12092023f88af8e2a3ee7702c (diff)
downloadxrdp-proprietary-af4dbdc75ae631b821d713917d8057b1f9c33266.tar.gz
xrdp-proprietary-af4dbdc75ae631b821d713917d8057b1f9c33266.zip
X11rdp: fix for dragging text in Firefox, more logging
Diffstat (limited to 'xorg/X11R7.6')
-rw-r--r--xorg/X11R7.6/rdp/rdp.h2
-rw-r--r--xorg/X11R7.6/rdp/rdpCopyArea.c4
-rw-r--r--xorg/X11R7.6/rdp/rdpCopyPlane.c4
-rw-r--r--xorg/X11R7.6/rdp/rdpFillPolygon.c4
-rw-r--r--xorg/X11R7.6/rdp/rdpImageGlyphBlt.c4
-rw-r--r--xorg/X11R7.6/rdp/rdpImageText16.c4
-rw-r--r--xorg/X11R7.6/rdp/rdpImageText8.c4
-rw-r--r--xorg/X11R7.6/rdp/rdpPolyArc.c4
-rw-r--r--xorg/X11R7.6/rdp/rdpPolyFillArc.c4
-rw-r--r--xorg/X11R7.6/rdp/rdpPolyFillRect.c4
-rw-r--r--xorg/X11R7.6/rdp/rdpPolyGlyphBlt.c4
-rw-r--r--xorg/X11R7.6/rdp/rdpPolyRectangle.c4
-rw-r--r--xorg/X11R7.6/rdp/rdpPolyText16.c4
-rw-r--r--xorg/X11R7.6/rdp/rdpPolyText8.c4
-rw-r--r--xorg/X11R7.6/rdp/rdpPushPixels.c4
-rw-r--r--xorg/X11R7.6/rdp/rdpPutImage.c4
-rw-r--r--xorg/X11R7.6/rdp/rdpdraw.c105
-rw-r--r--xorg/X11R7.6/rdp/rdpup.c3
18 files changed, 109 insertions, 61 deletions
diff --git a/xorg/X11R7.6/rdp/rdp.h b/xorg/X11R7.6/rdp/rdp.h
index 22dcdbf7..9fe41922 100644
--- a/xorg/X11R7.6/rdp/rdp.h
+++ b/xorg/X11R7.6/rdp/rdp.h
@@ -341,7 +341,7 @@ int
draw_item_pack(PixmapPtr pix, rdpPixmapRec* priv);
int
draw_item_add_img_region(rdpPixmapRec* priv, RegionPtr reg, int opcode,
- int type);
+ int type, int code);
int
draw_item_add_fill_region(rdpPixmapRec* priv, RegionPtr reg, int color,
int opcode);
diff --git a/xorg/X11R7.6/rdp/rdpCopyArea.c b/xorg/X11R7.6/rdp/rdpCopyArea.c
index cdece2c9..bc5ce102 100644
--- a/xorg/X11R7.6/rdp/rdpCopyArea.c
+++ b/xorg/X11R7.6/rdp/rdpCopyArea.c
@@ -537,7 +537,7 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
box.x2 = box.x1 + w;
box.y2 = box.y1 + h;
RegionInit(&reg1, &box, 0);
- draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type, 1);
RegionUninit(&reg1);
}
else if (got_id)
@@ -561,7 +561,7 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
box.y2 = box.y1 + h;
RegionInit(&box_reg, &box, 0);
RegionIntersect(&clip_reg, &clip_reg, &box_reg);
- draw_item_add_img_region(pDirtyPriv, &clip_reg, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &clip_reg, GXcopy, dirty_type, 1);
RegionUninit(&box_reg);
}
else if (got_id)
diff --git a/xorg/X11R7.6/rdp/rdpCopyPlane.c b/xorg/X11R7.6/rdp/rdpCopyPlane.c
index 47e66e59..aac03287 100644
--- a/xorg/X11R7.6/rdp/rdpCopyPlane.c
+++ b/xorg/X11R7.6/rdp/rdpCopyPlane.c
@@ -168,7 +168,7 @@ rdpCopyPlane(DrawablePtr pSrc, DrawablePtr pDst,
box.x2 = box.x1 + w;
box.y2 = box.y1 + h;
RegionInit(&reg1, &box, 0);
- draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type, 5);
RegionUninit(&reg1);
}
else if (got_id)
@@ -194,7 +194,7 @@ rdpCopyPlane(DrawablePtr pSrc, DrawablePtr pDst,
RegionInit(&reg2, NullBox, 0);
RegionCopy(&reg2, &clip_reg);
RegionIntersect(&reg1, &reg1, &reg2);
- draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type, 5);
RegionUninit(&reg1);
RegionUninit(&reg2);
}
diff --git a/xorg/X11R7.6/rdp/rdpFillPolygon.c b/xorg/X11R7.6/rdp/rdpFillPolygon.c
index 53227159..4c54f447 100644
--- a/xorg/X11R7.6/rdp/rdpFillPolygon.c
+++ b/xorg/X11R7.6/rdp/rdpFillPolygon.c
@@ -203,7 +203,7 @@ rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC,
if (dirty_type != 0)
{
RegionInit(&reg1, &box, 0);
- draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type, 7);
RegionUninit(&reg1);
}
else if (got_id)
@@ -223,7 +223,7 @@ rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC,
{
if (dirty_type != 0)
{
- draw_item_add_img_region(pDirtyPriv, &clip_reg, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &clip_reg, GXcopy, dirty_type, 7);
}
else if (got_id)
{
diff --git a/xorg/X11R7.6/rdp/rdpImageGlyphBlt.c b/xorg/X11R7.6/rdp/rdpImageGlyphBlt.c
index e0ec5502..c5fcfaa7 100644
--- a/xorg/X11R7.6/rdp/rdpImageGlyphBlt.c
+++ b/xorg/X11R7.6/rdp/rdpImageGlyphBlt.c
@@ -169,7 +169,7 @@ rdpImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
if (dirty_type != 0)
{
RegionInit(&reg1, &box, 0);
- draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type, 13);
RegionUninit(&reg1);
}
else if (got_id)
@@ -189,7 +189,7 @@ rdpImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
{
if (dirty_type != 0)
{
- draw_item_add_img_region(pDirtyPriv, &reg, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg, GXcopy, dirty_type, 13);
}
else if (got_id)
{
diff --git a/xorg/X11R7.6/rdp/rdpImageText16.c b/xorg/X11R7.6/rdp/rdpImageText16.c
index 71e9b351..db3e1de6 100644
--- a/xorg/X11R7.6/rdp/rdpImageText16.c
+++ b/xorg/X11R7.6/rdp/rdpImageText16.c
@@ -167,7 +167,7 @@ rdpImageText16(DrawablePtr pDrawable, GCPtr pGC,
if (dirty_type != 0)
{
RegionInit(&reg1, &box, 0);
- draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type, 12);
RegionUninit(&reg1);
}
else if (got_id)
@@ -187,7 +187,7 @@ rdpImageText16(DrawablePtr pDrawable, GCPtr pGC,
{
if (dirty_type != 0)
{
- draw_item_add_img_region(pDirtyPriv, &reg, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg, GXcopy, dirty_type, 12);
}
else if (got_id)
{
diff --git a/xorg/X11R7.6/rdp/rdpImageText8.c b/xorg/X11R7.6/rdp/rdpImageText8.c
index 6acdc205..641637e0 100644
--- a/xorg/X11R7.6/rdp/rdpImageText8.c
+++ b/xorg/X11R7.6/rdp/rdpImageText8.c
@@ -167,7 +167,7 @@ rdpImageText8(DrawablePtr pDrawable, GCPtr pGC,
if (dirty_type != 0)
{
RegionInit(&reg1, &box, 0);
- draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type, 9);
RegionUninit(&reg1);
}
else if (got_id)
@@ -187,7 +187,7 @@ rdpImageText8(DrawablePtr pDrawable, GCPtr pGC,
{
if (dirty_type != 0)
{
- draw_item_add_img_region(pDirtyPriv, &reg, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg, GXcopy, dirty_type, 9);
}
else if (got_id)
{
diff --git a/xorg/X11R7.6/rdp/rdpPolyArc.c b/xorg/X11R7.6/rdp/rdpPolyArc.c
index 42a8c19e..6d6651f1 100644
--- a/xorg/X11R7.6/rdp/rdpPolyArc.c
+++ b/xorg/X11R7.6/rdp/rdpPolyArc.c
@@ -185,7 +185,7 @@ rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
{
if (dirty_type != 0)
{
- draw_item_add_img_region(pDirtyPriv, tmpRegion, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, tmpRegion, GXcopy, dirty_type, 6);
}
else if (got_id)
{
@@ -217,7 +217,7 @@ rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
{
if (dirty_type != 0)
{
- draw_item_add_img_region(pDirtyPriv, tmpRegion, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, tmpRegion, GXcopy, dirty_type, 6);
}
else if (got_id)
{
diff --git a/xorg/X11R7.6/rdp/rdpPolyFillArc.c b/xorg/X11R7.6/rdp/rdpPolyFillArc.c
index aa1171da..6582f69e 100644
--- a/xorg/X11R7.6/rdp/rdpPolyFillArc.c
+++ b/xorg/X11R7.6/rdp/rdpPolyFillArc.c
@@ -185,7 +185,7 @@ rdpPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
{
if (dirty_type != 0)
{
- draw_item_add_img_region(pDirtyPriv, tmpRegion, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, tmpRegion, GXcopy, dirty_type, 8);
}
else if (got_id)
{
@@ -217,7 +217,7 @@ rdpPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
{
if (dirty_type != 0)
{
- draw_item_add_img_region(pDirtyPriv, tmpRegion, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, tmpRegion, GXcopy, dirty_type, 8);
}
else if (got_id)
{
diff --git a/xorg/X11R7.6/rdp/rdpPolyFillRect.c b/xorg/X11R7.6/rdp/rdpPolyFillRect.c
index 254cdff8..2e23dacf 100644
--- a/xorg/X11R7.6/rdp/rdpPolyFillRect.c
+++ b/xorg/X11R7.6/rdp/rdpPolyFillRect.c
@@ -173,7 +173,7 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
}
else
{
- draw_item_add_img_region(pDirtyPriv, fill_reg, GXcopy, RDI_IMGLL);
+ draw_item_add_img_region(pDirtyPriv, fill_reg, GXcopy, RDI_IMGLL, 2);
}
}
else if (got_id)
@@ -236,7 +236,7 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
}
else
{
- draw_item_add_img_region(pDirtyPriv, &clip_reg, GXcopy, RDI_IMGLL);
+ draw_item_add_img_region(pDirtyPriv, &clip_reg, GXcopy, RDI_IMGLL, 2);
}
}
else if (got_id)
diff --git a/xorg/X11R7.6/rdp/rdpPolyGlyphBlt.c b/xorg/X11R7.6/rdp/rdpPolyGlyphBlt.c
index f166b731..298b4b98 100644
--- a/xorg/X11R7.6/rdp/rdpPolyGlyphBlt.c
+++ b/xorg/X11R7.6/rdp/rdpPolyGlyphBlt.c
@@ -169,7 +169,7 @@ rdpPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
if (dirty_type != 0)
{
RegionInit(&reg1, &box, 0);
- draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type, 14);
RegionUninit(&reg1);
}
else if (got_id)
@@ -189,7 +189,7 @@ rdpPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
{
if (dirty_type != 0)
{
- draw_item_add_img_region(pDirtyPriv, &reg, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg, GXcopy, dirty_type, 14);
}
else if (got_id)
{
diff --git a/xorg/X11R7.6/rdp/rdpPolyRectangle.c b/xorg/X11R7.6/rdp/rdpPolyRectangle.c
index 7fdb4e8b..75f85664 100644
--- a/xorg/X11R7.6/rdp/rdpPolyRectangle.c
+++ b/xorg/X11R7.6/rdp/rdpPolyRectangle.c
@@ -221,7 +221,7 @@ rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects,
}
else
{
- draw_item_add_img_region(pDirtyPriv, fill_reg, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, fill_reg, GXcopy, dirty_type, 4);
}
RegionDestroy(fill_reg);
@@ -275,7 +275,7 @@ rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects,
}
else
{
- draw_item_add_img_region(pDirtyPriv, &clip_reg, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &clip_reg, GXcopy, dirty_type, 4);
}
}
else if (got_id)
diff --git a/xorg/X11R7.6/rdp/rdpPolyText16.c b/xorg/X11R7.6/rdp/rdpPolyText16.c
index 034b11e1..9a253464 100644
--- a/xorg/X11R7.6/rdp/rdpPolyText16.c
+++ b/xorg/X11R7.6/rdp/rdpPolyText16.c
@@ -170,7 +170,7 @@ rdpPolyText16(DrawablePtr pDrawable, GCPtr pGC,
if (dirty_type != 0)
{
RegionInit(&reg1, &box, 0);
- draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type, 11);
RegionUninit(&reg1);
}
else if (got_id)
@@ -190,7 +190,7 @@ rdpPolyText16(DrawablePtr pDrawable, GCPtr pGC,
{
if (dirty_type != 0)
{
- draw_item_add_img_region(pDirtyPriv, &reg, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg, GXcopy, dirty_type, 11);
}
else if (got_id)
{
diff --git a/xorg/X11R7.6/rdp/rdpPolyText8.c b/xorg/X11R7.6/rdp/rdpPolyText8.c
index c06feac3..59f04d78 100644
--- a/xorg/X11R7.6/rdp/rdpPolyText8.c
+++ b/xorg/X11R7.6/rdp/rdpPolyText8.c
@@ -170,7 +170,7 @@ rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
if (dirty_type != 0)
{
RegionInit(&reg1, &box, 0);
- draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type, 10);
RegionUninit(&reg1);
}
else if (got_id)
@@ -190,7 +190,7 @@ rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
{
if (dirty_type != 0)
{
- draw_item_add_img_region(pDirtyPriv, &reg, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg, GXcopy, dirty_type, 10);
}
else if (got_id)
{
diff --git a/xorg/X11R7.6/rdp/rdpPushPixels.c b/xorg/X11R7.6/rdp/rdpPushPixels.c
index f7b77f23..6a353977 100644
--- a/xorg/X11R7.6/rdp/rdpPushPixels.c
+++ b/xorg/X11R7.6/rdp/rdpPushPixels.c
@@ -160,7 +160,7 @@ rdpPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
box.x2 = box.x1 + w;
box.y2 = box.y1 + h;
RegionInit(&reg1, &box, 0);
- draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type, 15);
RegionUninit(&reg1);
}
else if (got_id)
@@ -185,7 +185,7 @@ rdpPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
if (dirty_type != 0)
{
RegionInit(&reg1, &box, 0);
- draw_item_add_img_region(pDirtyPriv, &clip_reg, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &clip_reg, GXcopy, dirty_type, 15);
RegionUninit(&reg1);
}
else if (got_id)
diff --git a/xorg/X11R7.6/rdp/rdpPutImage.c b/xorg/X11R7.6/rdp/rdpPutImage.c
index 614d0a31..5da689d6 100644
--- a/xorg/X11R7.6/rdp/rdpPutImage.c
+++ b/xorg/X11R7.6/rdp/rdpPutImage.c
@@ -161,7 +161,7 @@ rdpPutImage(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y,
box.x2 = box.x1 + w;
box.y2 = box.y1 + h;
RegionInit(&reg1, &box, 0);
- draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type, 3);
RegionUninit(&reg1);
}
else if (got_id)
@@ -183,7 +183,7 @@ rdpPutImage(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y,
RegionInit(&reg2, NullBox, 0);
RegionCopy(&reg2, &clip_reg);
RegionIntersect(&reg1, &reg1, &reg2);
- draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type, 3);
RegionUninit(&reg1);
RegionUninit(&reg2);
}
diff --git a/xorg/X11R7.6/rdp/rdpdraw.c b/xorg/X11R7.6/rdp/rdpdraw.c
index 839854af..1d071a8a 100644
--- a/xorg/X11R7.6/rdp/rdpdraw.c
+++ b/xorg/X11R7.6/rdp/rdpdraw.c
@@ -583,13 +583,35 @@ draw_item_pack(PixmapPtr pix, rdpPixmapRec *priv)
return 0;
}
+static char g_strings[][32] =
+{
+ "Composite", /* 0 */
+ "CopyArea", /* 1 */
+ "PolyFillRect", /* 2 */
+ "PutImage", /* 3 */
+ "PolyRectangle", /* 4 */
+ "CopyPlane", /* 5 */
+ "PolyArc", /* 6 */
+ "FillPolygon", /* 7 */
+ "PolyFillArc", /* 8 */
+ "ImageText8", /* 9 */
+ "PolyText8", /* 10 */
+ "PolyText16", /* 11 */
+ "ImageText16", /* 12 */
+ "ImageGlyphBlt", /* 13 */
+ "PolyGlyphBlt", /* 14 */
+ "PushPixels", /* 15 */
+ "Other"
+};
+
/******************************************************************************/
int
draw_item_add_img_region(rdpPixmapRec *priv, RegionPtr reg, int opcode,
- int type)
+ int type, int code)
{
struct rdp_draw_item *di;
+ LLOGLN(10, ("draw_item_add_img_region: %s", g_strings[code]));
di = (struct rdp_draw_item *)g_malloc(sizeof(struct rdp_draw_item), 1);
di->type = type;
di->reg = RegionCreate(NullBox, 0);
@@ -606,6 +628,7 @@ draw_item_add_fill_region(rdpPixmapRec *priv, RegionPtr reg, int color,
{
struct rdp_draw_item *di;
+ LLOGLN(10, ("draw_item_add_fill_region:"));
di = (struct rdp_draw_item *)g_malloc(sizeof(struct rdp_draw_item), 1);
di->type = RDI_FILL;
di->u.fill.fg_color = color;
@@ -760,7 +783,7 @@ xrdp_is_os(PixmapPtr pix, rdpPixmapPtr priv)
{
draw_item_remove_all(priv);
RegionInit(&reg1, &box, 0);
- draw_item_add_img_region(priv, &reg1, GXcopy, RDI_IMGLL);
+ draw_item_add_img_region(priv, &reg1, GXcopy, RDI_IMGLL, 16);
RegionUninit(&reg1);
priv->is_dirty = 1;
priv->con_number = g_con_number;
@@ -1004,6 +1027,7 @@ rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion)
int num_reg_rects;
BoxRec box1;
BoxRec box2;
+ BoxPtr box3;
LLOGLN(10, ("in rdpCopyWindow"));
RegionInit(&reg, NullBox, 0);
@@ -1025,37 +1049,60 @@ rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion)
rdpup_begin_update();
num_clip_rects = REGION_NUM_RECTS(&clip);
num_reg_rects = REGION_NUM_RECTS(&reg);
+ LLOGLN(10, ("rdpCopyWindow: num_clip_rects %d num_reg_rects %d",
+ num_clip_rects, num_reg_rects));
- /* should maybe sort the rects instead of checking dy < 0 */
- /* If we can depend on the rects going from top to bottom, left
- to right we are ok */
- if (dy < 0 || (dy == 0 && dx < 0))
+ /* when there is a huge list of screen copies, just send as bitmap
+ firefox dragging test does this */
+ if ((num_clip_rects > 16) && (num_reg_rects > 16))
{
- for (j = 0; j < num_clip_rects; j++)
- {
- box1 = REGION_RECTS(&clip)[j];
- rdpup_set_clip(box1.x1, box1.y1, box1.x2 - box1.x1, box1.y2 - box1.y1);
-
- for (i = 0; i < num_reg_rects; i++)
- {
- box2 = REGION_RECTS(&reg)[i];
- rdpup_screen_blt(box2.x1 + dx, box2.y1 + dy, box2.x2 - box2.x1,
- box2.y2 - box2.y1, box2.x1, box2.y1);
- }
- }
+ box3 = RegionExtents(&reg);
+ rdpup_send_area(0, box3->x1, box3->y1,
+ box3->x2 - box3->x1,
+ box3->y2 - box3->y1);
}
else
{
- for (j = num_clip_rects - 1; j >= 0; j--)
+
+ /* should maybe sort the rects instead of checking dy < 0 */
+ /* If we can depend on the rects going from top to bottom, left
+ to right we are ok */
+ if (dy < 0 || (dy == 0 && dx < 0))
{
- box1 = REGION_RECTS(&clip)[j];
- rdpup_set_clip(box1.x1, box1.y1, box1.x2 - box1.x1, box1.y2 - box1.y1);
+ for (j = 0; j < num_clip_rects; j++)
+ {
+ box1 = REGION_RECTS(&clip)[j];
+ rdpup_set_clip(box1.x1, box1.y1,
+ box1.x2 - box1.x1,
+ box1.y2 - box1.y1);
- for (i = num_reg_rects - 1; i >= 0; i--)
+ for (i = 0; i < num_reg_rects; i++)
+ {
+ box2 = REGION_RECTS(&reg)[i];
+ rdpup_screen_blt(box2.x1 + dx, box2.y1 + dy,
+ box2.x2 - box2.x1,
+ box2.y2 - box2.y1,
+ box2.x1, box2.y1);
+ }
+ }
+ }
+ else
+ {
+ for (j = num_clip_rects - 1; j >= 0; j--)
{
- box2 = REGION_RECTS(&reg)[i];
- rdpup_screen_blt(box2.x1 + dx, box2.y1 + dy, box2.x2 - box2.x1,
- box2.y2 - box2.y1, box2.x1, box2.y1);
+ box1 = REGION_RECTS(&clip)[j];
+ rdpup_set_clip(box1.x1, box1.y1,
+ box1.x2 - box1.x1,
+ box1.y2 - box1.y1);
+
+ for (i = num_reg_rects - 1; i >= 0; i--)
+ {
+ box2 = REGION_RECTS(&reg)[i];
+ rdpup_screen_blt(box2.x1 + dx, box2.y1 + dy,
+ box2.x2 - box2.x1,
+ box2.y2 - box2.y1,
+ box2.x1, box2.y1);
+ }
}
}
}
@@ -1104,7 +1151,7 @@ rdpClearToBackground(WindowPtr pWin, int x, int y, int w, int h,
if (g_do_dirty_ons)
{
- draw_item_add_img_region(&g_screenPriv, &reg, GXcopy, RDI_IMGLL);
+ draw_item_add_img_region(&g_screenPriv, &reg, GXcopy, RDI_IMGLL, 16);
}
else
{
@@ -1142,7 +1189,7 @@ rdpRestoreAreas(WindowPtr pWin, RegionPtr prgnExposed)
if (g_do_dirty_ons)
{
- draw_item_add_img_region(&g_screenPriv, &reg, GXcopy, RDI_IMGLL);
+ draw_item_add_img_region(&g_screenPriv, &reg, GXcopy, RDI_IMGLL, 16);
}
else
{
@@ -1337,7 +1384,7 @@ rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
if (dirty_type != 0)
{
- draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type, 0);
}
else if (got_id)
{
@@ -1370,7 +1417,7 @@ rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
if (dirty_type != 0)
{
RegionInit(&reg1, &box, 0);
- draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type);
+ draw_item_add_img_region(pDirtyPriv, &reg1, GXcopy, dirty_type, 0);
RegionUninit(&reg1);
}
else if (got_id)
diff --git a/xorg/X11R7.6/rdp/rdpup.c b/xorg/X11R7.6/rdp/rdpup.c
index 61ed302a..69e92fc2 100644
--- a/xorg/X11R7.6/rdp/rdpup.c
+++ b/xorg/X11R7.6/rdp/rdpup.c
@@ -1059,7 +1059,8 @@ rdpup_screen_blt(short x, short y, int cx, int cy, short srcx, short srcy)
{
if (g_connected)
{
- LLOGLN(10, (" rdpup_screen_blt"));
+ LLOGLN(10, (" rdpup_screen_blt x %d y %d cx %d cy %d srcx %d srcy %d",
+ x, y, cx, cy, srcx, srcy));
rdpup_pre_check(16);
out_uint16_le(g_out_s, 4); /* screen blt */
out_uint16_le(g_out_s, 16); /* size */