use dx, dy in CopyArea PixToPix, not WndToPix

ulab-next
Jay Sorg 12 years ago
parent 172a8b9f17
commit 1674108d8d

@ -148,8 +148,6 @@ rdpCopyAreaWndToPixmap(WindowPtr pSrcWnd,
int ldstx; int ldstx;
int ldsty; int ldsty;
int num_clips; int num_clips;
int dx;
int dy;
int j; int j;
BoxRec box; BoxRec box;
RegionPtr rv; RegionPtr rv;
@ -182,26 +180,12 @@ rdpCopyAreaWndToPixmap(WindowPtr pSrcWnd,
{ {
rdpup_switch_os_surface(pDstPriv->rdpindex); rdpup_switch_os_surface(pDstPriv->rdpindex);
rdpup_begin_update(); rdpup_begin_update();
dx = dstx - srcx;
dy = dsty - srcy;
if ((dy < 0) || ((dy == 0) && (dx < 0))) for (j = 0; j < num_clips; j++)
{
for (j = 0; j < num_clips; j++)
{
box = REGION_RECTS(&clip_reg)[j];
rdpup_set_clip(box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
rdpup_screen_blt(ldstx, ldsty, w, h, lsrcx, lsrcy);
}
}
else
{ {
for (j = num_clips - 1; j >= 0; j--) box = REGION_RECTS(&clip_reg)[j];
{ rdpup_set_clip(box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
box = REGION_RECTS(&clip_reg)[j]; rdpup_screen_blt(ldstx, ldsty, w, h, lsrcx, lsrcy);
rdpup_set_clip(box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
rdpup_screen_blt(ldstx, ldsty, w, h, lsrcx, lsrcy);
}
} }
rdpup_reset_clip(); rdpup_reset_clip();
@ -292,6 +276,8 @@ rdpCopyAreaPixmapToPixmap(PixmapPtr pSrcPixmap, rdpPixmapRec *pSrcPriv,
int cd; int cd;
int j; int j;
int num_clips; int num_clips;
int dx;
int dy;
RegionPtr rv; RegionPtr rv;
RegionRec clip_reg; RegionRec clip_reg;
BoxRec box; BoxRec box;
@ -325,14 +311,30 @@ rdpCopyAreaPixmapToPixmap(PixmapPtr pSrcPixmap, rdpPixmapRec *pSrcPriv,
{ {
rdpup_switch_os_surface(pDstPriv->rdpindex); rdpup_switch_os_surface(pDstPriv->rdpindex);
rdpup_begin_update(); rdpup_begin_update();
dx = dstx - srcx;
dy = dsty - srcy;
LLOGLN(10, ("rdpCopyAreaPixmapToPixmap: num_clips %d", num_clips)); LLOGLN(10, ("rdpCopyAreaPixmapToPixmap: num_clips %d", num_clips));
for (j = 0; j < num_clips; j++) if ((dy < 0) || ((dy == 0) && (dx < 0)))
{ {
box = REGION_RECTS(&clip_reg)[j]; for (j = 0; j < num_clips; j++)
rdpup_set_clip(box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1); {
rdpup_paint_rect_os(ldstx, ldsty, w, h, pSrcPriv->rdpindex, lsrcx, lsrcy); box = REGION_RECTS(&clip_reg)[j];
LLOGLN(10, ("%d %d %d %d %d %d", ldstx, ldsty, w, h, lsrcx, lsrcy)); rdpup_set_clip(box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
rdpup_paint_rect_os(ldstx, ldsty, w, h, pSrcPriv->rdpindex, lsrcx, lsrcy);
LLOGLN(10, ("%d %d %d %d %d %d", ldstx, ldsty, w, h, lsrcx, lsrcy));
}
}
else
{
for (j = num_clips - 1; j >= 0; j--)
{
box = REGION_RECTS(&clip_reg)[j];
rdpup_set_clip(box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
rdpup_paint_rect_os(ldstx, ldsty, w, h, pSrcPriv->rdpindex, lsrcx, lsrcy);
LLOGLN(10, ("%d %d %d %d %d %d", ldstx, ldsty, w, h, lsrcx, lsrcy));
}
} }
rdpup_reset_clip(); rdpup_reset_clip();

Loading…
Cancel
Save