diff options
-rw-r--r-- | xorg/X11R7.6/rdp/rdp.h | 2 | ||||
-rw-r--r-- | xorg/X11R7.6/rdp/rdpCopyArea.c | 20 | ||||
-rw-r--r-- | xorg/X11R7.6/rdp/rdpImageText16.c | 2 | ||||
-rw-r--r-- | xorg/X11R7.6/rdp/rdpPolyFillRect.c | 35 | ||||
-rw-r--r-- | xorg/X11R7.6/rdp/rdpPolyRectangle.c | 2 | ||||
-rw-r--r-- | xorg/X11R7.6/rdp/rdpPolySegment.c | 2 | ||||
-rw-r--r-- | xorg/X11R7.6/rdp/rdpPolylines.c | 2 | ||||
-rw-r--r-- | xorg/X11R7.6/rdp/rdpPutImage.c | 4 | ||||
-rw-r--r-- | xorg/X11R7.6/rdp/rdpdraw.c | 120 | ||||
-rw-r--r-- | xorg/X11R7.6/rdp/rdpmain.c | 2 | ||||
-rw-r--r-- | xorg/X11R7.6/rdp/rdpup.c | 8 |
11 files changed, 121 insertions, 78 deletions
diff --git a/xorg/X11R7.6/rdp/rdp.h b/xorg/X11R7.6/rdp/rdp.h index 9fe41922..6fd7c38a 100644 --- a/xorg/X11R7.6/rdp/rdp.h +++ b/xorg/X11R7.6/rdp/rdp.h @@ -258,7 +258,7 @@ struct _rdpPixmapRec int rdpindex; int con_number; int is_dirty; - int pad0; + int is_scratch; int kind_width; struct rdp_draw_item* draw_item_head; struct rdp_draw_item* draw_item_tail; diff --git a/xorg/X11R7.6/rdp/rdpCopyArea.c b/xorg/X11R7.6/rdp/rdpCopyArea.c index bc5ce102..a97aaf56 100644 --- a/xorg/X11R7.6/rdp/rdpCopyArea.c +++ b/xorg/X11R7.6/rdp/rdpCopyArea.c @@ -375,7 +375,7 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, WindowPtr pDstWnd; WindowPtr pSrcWnd; - LLOGLN(10, ("rdpCopyArea:")); + LLOGLN(10, ("rdpCopyArea: x %d y %d w %d h %d", dstx, dsty, w, h)); if (pSrc->type == DRAWABLE_WINDOW) { @@ -416,6 +416,10 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, srcx, srcy, w, h, dstx, dsty); } } + else + { + LLOGLN(10, ("rdpCopyArea: 1")); + } } } } @@ -456,8 +460,16 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, dstx, dsty); } } + else + { + LLOGLN(10, ("rdpCopyArea: 4")); + } } } + else + { + LLOGLN(10, ("rdpCopyArea: 2")); + } } /* do original call */ @@ -493,6 +505,10 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, got_id = 1; } } + else + { + LLOGLN(10, ("rdpCopyArea: 3")); + } } else { @@ -506,7 +522,7 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, if (g_do_dirty_ons) { - LLOGLN(0, ("rdpCopyArea: gettig dirty")); + LLOGLN(10, ("rdpCopyArea: gettig dirty")); g_screenPriv.is_dirty = 1; pDirtyPriv = &g_screenPriv; dirty_type = RDI_IMGLL; diff --git a/xorg/X11R7.6/rdp/rdpImageText16.c b/xorg/X11R7.6/rdp/rdpImageText16.c index db3e1de6..e6048095 100644 --- a/xorg/X11R7.6/rdp/rdpImageText16.c +++ b/xorg/X11R7.6/rdp/rdpImageText16.c @@ -132,7 +132,7 @@ rdpImageText16(DrawablePtr pDrawable, GCPtr pGC, if (g_do_dirty_ons) { - LLOGLN(0, ("rdpImageText16: gettig dirty")); + LLOGLN(10, ("rdpImageText16: gettig dirty")); g_screenPriv.is_dirty = 1; pDirtyPriv = &g_screenPriv; dirty_type = RDI_IMGLL; diff --git a/xorg/X11R7.6/rdp/rdpPolyFillRect.c b/xorg/X11R7.6/rdp/rdpPolyFillRect.c index 2e23dacf..e51fca4c 100644 --- a/xorg/X11R7.6/rdp/rdpPolyFillRect.c +++ b/xorg/X11R7.6/rdp/rdpPolyFillRect.c @@ -98,8 +98,25 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, { pDstPixmap = (PixmapPtr)pDrawable; pDstPriv = GETPIXPRIV(pDstPixmap); + if (pDstPixmap->devPrivate.ptr == g_rdpScreen.pfbMemory) + { + /* treat like root window */ + post_process = 1; - if (xrdp_is_os(pDstPixmap, pDstPriv)) + if (g_do_dirty_ons) + { + LLOGLN(10, ("rdpPolyFillRect: gettig dirty")); + g_screenPriv.is_dirty = 1; + pDirtyPriv = &g_screenPriv; + dirty_type = RDI_IMGLL; + } + else + { + rdpup_get_screen_image_rect(&id); + got_id = 1; + } + } + else if (xrdp_is_os(pDstPixmap, pDstPriv)) { post_process = 1; @@ -131,7 +148,7 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, if (g_do_dirty_ons) { - LLOGLN(0, ("rdpPolyFillRect: gettig dirty")); + LLOGLN(10, ("rdpPolyFillRect: gettig dirty")); g_screenPriv.is_dirty = 1; pDirtyPriv = &g_screenPriv; dirty_type = RDI_IMGLL; @@ -148,12 +165,14 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, if (!post_process) { RegionDestroy(fill_reg); + LLOGLN(10, ("rdpPolyFillRect: out, post_process not set")); return; } RegionTranslate(fill_reg, pDrawable->x, pDrawable->y); RegionInit(&clip_reg, NullBox, 0); cd = rdp_get_clip(&clip_reg, pDrawable, pGC); + LLOGLN(10, ("rdpPolyFillRect: cd %d", cd)); if (cd == 1) /* no clip */ { @@ -166,7 +185,7 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, pGC->alu == GXnoop || pGC->alu == GXand || pGC->alu == GXcopy /*|| - pGC->alu == GXxor*/)) /* todo, why dosen't xor work? */ + pGC->alu == GXxor*/)) /* todo, why dosen't xor work? */ { draw_item_add_fill_region(pDirtyPriv, fill_reg, pGC->fgPixel, pGC->alu); @@ -187,7 +206,7 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, pGC->alu == GXnoop || pGC->alu == GXand || pGC->alu == GXcopy /*|| - pGC->alu == GXxor*/)) /* todo, why dosen't xor work? */ + pGC->alu == GXxor*/)) /* todo, why dosen't xor work? */ { rdpup_set_fgcolor(pGC->fgPixel); rdpup_set_opcode(pGC->alu); @@ -229,13 +248,15 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, pGC->alu == GXnoop || pGC->alu == GXand || pGC->alu == GXcopy /*|| - pGC->alu == GXxor*/)) /* todo, why dosen't xor work? */ + pGC->alu == GXxor*/)) /* todo, why dosen't xor work? */ { + LLOGLN(10, ("rdpPolyFillRect: 3")); draw_item_add_fill_region(pDirtyPriv, &clip_reg, pGC->fgPixel, pGC->alu); } else { + LLOGLN(10, ("rdpPolyFillRect: 4")); draw_item_add_img_region(pDirtyPriv, &clip_reg, GXcopy, RDI_IMGLL, 2); } } @@ -243,6 +264,8 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, { rdpup_begin_update(); + LLOGLN(10, ("2 %x", pGC->fgPixel)); + if (pGC->fillStyle == 0 && /* solid fill */ (pGC->alu == GXclear || pGC->alu == GXset || @@ -250,7 +273,7 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, pGC->alu == GXnoop || pGC->alu == GXand || pGC->alu == GXcopy /*|| - pGC->alu == GXxor*/)) /* todo, why dosen't xor work? */ + pGC->alu == GXxor*/)) /* todo, why dosen't xor work? */ { rdpup_set_fgcolor(pGC->fgPixel); rdpup_set_opcode(pGC->alu); diff --git a/xorg/X11R7.6/rdp/rdpPolyRectangle.c b/xorg/X11R7.6/rdp/rdpPolyRectangle.c index 75f85664..85bef306 100644 --- a/xorg/X11R7.6/rdp/rdpPolyRectangle.c +++ b/xorg/X11R7.6/rdp/rdpPolyRectangle.c @@ -144,7 +144,7 @@ rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects, if (g_do_dirty_ons) { - LLOGLN(0, ("rdpPolyRectangle: gettig dirty")); + LLOGLN(10, ("rdpPolyRectangle: gettig dirty")); g_screenPriv.is_dirty = 1; pDirtyPriv = &g_screenPriv; dirty_type = RDI_IMGLL; diff --git a/xorg/X11R7.6/rdp/rdpPolySegment.c b/xorg/X11R7.6/rdp/rdpPolySegment.c index fab6445e..623ec748 100644 --- a/xorg/X11R7.6/rdp/rdpPolySegment.c +++ b/xorg/X11R7.6/rdp/rdpPolySegment.c @@ -141,7 +141,7 @@ rdpPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs) if (g_do_dirty_ons) { - LLOGLN(0, ("rdpPolySegment: gettig dirty")); + LLOGLN(10, ("rdpPolySegment: gettig dirty")); g_screenPriv.is_dirty = 1; pDirtyPriv = &g_screenPriv; dirty_type = RDI_IMGLL; diff --git a/xorg/X11R7.6/rdp/rdpPolylines.c b/xorg/X11R7.6/rdp/rdpPolylines.c index 92bb0678..759d1ff9 100644 --- a/xorg/X11R7.6/rdp/rdpPolylines.c +++ b/xorg/X11R7.6/rdp/rdpPolylines.c @@ -192,7 +192,7 @@ rdpPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, if (g_do_dirty_ons) { - LLOGLN(0, ("rdpPolylines: gettig dirty")); + LLOGLN(10, ("rdpPolylines: gettig dirty")); g_screenPriv.is_dirty = 1; pDirtyPriv = &g_screenPriv; dirty_type = RDI_IMGLL; diff --git a/xorg/X11R7.6/rdp/rdpPutImage.c b/xorg/X11R7.6/rdp/rdpPutImage.c index 5da689d6..737e4b31 100644 --- a/xorg/X11R7.6/rdp/rdpPutImage.c +++ b/xorg/X11R7.6/rdp/rdpPutImage.c @@ -83,6 +83,8 @@ rdpPutImage(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y, LLOGLN(10, ("rdpPutImage:")); LLOGLN(10, ("rdpPutImage: drawable id 0x%x", (int)(pDst->id))); + LLOGLN(10, ("rdpPutImage: x %d y %d w %d h %d is_window %d", x, y, w, h, + pDst->type == DRAWABLE_WINDOW)); /* do original call */ rdpPutImageOrg(pDst, pGC, depth, x, y, w, h, leftPad, format, pBits); @@ -130,7 +132,7 @@ rdpPutImage(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y, if (g_do_dirty_ons) { - LLOGLN(0, ("rdpPutImage: gettig dirty")); + LLOGLN(10, ("rdpPutImage: gettig dirty")); g_screenPriv.is_dirty = 1; pDirtyPriv = &g_screenPriv; dirty_type = RDI_IMGLL; diff --git a/xorg/X11R7.6/rdp/rdpdraw.c b/xorg/X11R7.6/rdp/rdpdraw.c index 1d071a8a..4b900f4e 100644 --- a/xorg/X11R7.6/rdp/rdpdraw.c +++ b/xorg/X11R7.6/rdp/rdpdraw.c @@ -714,6 +714,10 @@ rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, priv->kind_width = width; pScreen->ModifyPixmapHeader(rv, org_width, 0, 0, 0, 0, 0); pScreen->CreatePixmap = rdpCreatePixmap; + if (org_width == 0 && height == 0) + { + priv->is_scratch = 1; + } return rv; } @@ -764,7 +768,8 @@ xrdp_is_os(PixmapPtr pix, rdpPixmapPtr priv) height = pix->drawable.height; if ((pix->usage_hint == 0) && (pix->drawable.depth >= g_rdpScreen.depth) && - (width > 1) && (height > 1) && (priv->kind_width > 0)) + (width > 0) && (height > 0) && (priv->kind_width > 0) && + (priv->is_scratch == 0)) { LLOGLN(10, ("%d %d", priv->kind_width, pix->drawable.width)); priv->rdpindex = rdpup_add_os_bitmap(pix, priv); @@ -1018,6 +1023,7 @@ void rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion) { RegionRec reg; + RegionRec reg1; RegionRec clip; int dx; int dy; @@ -1032,8 +1038,6 @@ rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion) LLOGLN(10, ("in rdpCopyWindow")); RegionInit(®, NullBox, 0); RegionCopy(®, pOldRegion); - g_pScreen->CopyWindow = g_rdpScreen.CopyWindow; - g_pScreen->CopyWindow(pWin, ptOldOrg, pOldRegion); RegionInit(&clip, NullBox, 0); RegionCopy(&clip, &pWin->borderClip); dx = pWin->drawable.x - ptOldOrg.x; @@ -1041,78 +1045,76 @@ rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion) if (g_do_dirty_ons) { - LLOGLN(0, ("rdpCopyWindow: gettig dirty TODO")); - //draw_item_add_srcblt_region + rdpup_check_dirty_screen(&g_screenPriv); + } + rdpup_begin_update(); + num_clip_rects = REGION_NUM_RECTS(&clip); + num_reg_rects = REGION_NUM_RECTS(®); + LLOGLN(10, ("rdpCopyWindow: num_clip_rects %d num_reg_rects %d", + num_clip_rects, num_reg_rects)); + + /* 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)) + { + box3 = RegionExtents(®); + rdpup_send_area(0, box3->x1, box3->y1, + box3->x2 - box3->x1, + box3->y2 - box3->y1); } else { - rdpup_begin_update(); - num_clip_rects = REGION_NUM_RECTS(&clip); - num_reg_rects = REGION_NUM_RECTS(®); - LLOGLN(10, ("rdpCopyWindow: num_clip_rects %d num_reg_rects %d", - num_clip_rects, num_reg_rects)); - - /* 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)) - { - box3 = RegionExtents(®); - rdpup_send_area(0, box3->x1, box3->y1, - box3->x2 - box3->x1, - box3->y2 - box3->y1); - } - else - { - /* 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)) + /* 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)) + { + for (j = 0; j < num_clip_rects; j++) { - 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); + 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(®)[i]; - rdpup_screen_blt(box2.x1 + dx, box2.y1 + dy, - box2.x2 - box2.x1, - box2.y2 - box2.y1, - box2.x1, box2.y1); - } + for (i = 0; i < num_reg_rects; i++) + { + box2 = REGION_RECTS(®)[i]; + rdpup_screen_blt(box2.x1 + dx, box2.y1 + dy, + box2.x2 - box2.x1, + box2.y2 - box2.y1, + box2.x1, box2.y1); } } - else + } + else + { + for (j = num_clip_rects - 1; j >= 0; j--) { - for (j = num_clip_rects - 1; j >= 0; j--) - { - box1 = REGION_RECTS(&clip)[j]; - rdpup_set_clip(box1.x1, box1.y1, - box1.x2 - box1.x1, - box1.y2 - box1.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(®)[i]; - rdpup_screen_blt(box2.x1 + dx, box2.y1 + dy, - box2.x2 - box2.x1, - box2.y2 - box2.y1, - box2.x1, box2.y1); - } + for (i = num_reg_rects - 1; i >= 0; i--) + { + box2 = REGION_RECTS(®)[i]; + rdpup_screen_blt(box2.x1 + dx, box2.y1 + dy, + box2.x2 - box2.x1, + box2.y2 - box2.y1, + box2.x1, box2.y1); } } } - - rdpup_reset_clip(); - rdpup_end_update(); } + rdpup_reset_clip(); + rdpup_end_update(); + RegionUninit(®); RegionUninit(&clip); + g_pScreen->CopyWindow = g_rdpScreen.CopyWindow; + g_pScreen->CopyWindow(pWin, ptOldOrg, pOldRegion); g_pScreen->CopyWindow = rdpCopyWindow; } @@ -1351,7 +1353,7 @@ rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, if (g_do_dirty_ons) { - LLOGLN(0, ("rdpComposite: gettig dirty")); + LLOGLN(10, ("rdpComposite: gettig dirty")); g_screenPriv.is_dirty = 1; pDirtyPriv = &g_screenPriv; dirty_type = RDI_IMGLL; diff --git a/xorg/X11R7.6/rdp/rdpmain.c b/xorg/X11R7.6/rdp/rdpmain.c index 48ad7e4d..f1645cfe 100644 --- a/xorg/X11R7.6/rdp/rdpmain.c +++ b/xorg/X11R7.6/rdp/rdpmain.c @@ -46,7 +46,7 @@ DeviceIntPtr g_keyboard = 0; int g_can_do_pix_to_pix = 0; int g_do_dirty_os = 1; /* delay remoting off screen bitmaps */ -int g_do_dirty_ons = 0; /* delay remoting screen */ +int g_do_dirty_ons = 1; /* delay remoting screen */ Bool g_wrapWindow = 1; Bool g_wrapPixmap = 1; diff --git a/xorg/X11R7.6/rdp/rdpup.c b/xorg/X11R7.6/rdp/rdpup.c index 69e92fc2..06c8bd73 100644 --- a/xorg/X11R7.6/rdp/rdpup.c +++ b/xorg/X11R7.6/rdp/rdpup.c @@ -970,7 +970,7 @@ rdpup_check(void) int rdpup_begin_update(void) { - LLOGLN(10, ("rdpup_begin_update")); + LLOGLN(10, ("rdpup_begin_update:")); if (g_connected) { @@ -978,7 +978,6 @@ rdpup_begin_update(void) { return 0; } - init_stream(g_out_s, 0); s_push_layer(g_out_s, iso_hdr, 8); out_uint16_le(g_out_s, 1); /* begin update */ @@ -1001,6 +1000,7 @@ rdpup_end_update(void) { if (g_do_dirty_ons) { + /* in this mode, end update is only called in check dirty */ rdpup_send_pending(); } else @@ -1869,7 +1869,7 @@ rdpup_check_dirty(PixmapPtr pDirtyPixmap, rdpPixmapRec *pDirtyPriv) g_os_bitmaps[pDirtyPriv->rdpindex].stamp = g_os_bitmap_stamp; g_os_bitmap_stamp++; - LLOGLN(10, ("-----------------got dirty")); + LLOGLN(10, ("rdpup_check_dirty: got dirty")); rdpup_switch_os_surface(pDirtyPriv->rdpindex); rdpup_get_pixmap_image_rect(pDirtyPixmap, &id); rdpup_begin_update(); @@ -1995,7 +1995,7 @@ rdpup_check_dirty_screen(rdpPixmapRec *pDirtyPriv) return 0; } - LLOGLN(10, ("-----------------got dirty")); + LLOGLN(10, ("rdpup_check_dirty_screen: got dirty")); rdpup_get_screen_image_rect(&id); rdpup_begin_update(); draw_item_pack(0, pDirtyPriv); |