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 ldsty;
int num_clips;
int dx;
int dy;
int j;
BoxRec box;
RegionPtr rv;
@ -182,27 +180,13 @@ rdpCopyAreaWndToPixmap(WindowPtr pSrcWnd,
{
rdpup_switch_os_surface(pDstPriv->rdpindex);
rdpup_begin_update();
dx = dstx - srcx;
dy = dsty - srcy;
if ((dy < 0) || ((dy == 0) && (dx < 0)))
{
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);
rdpup_screen_blt(ldstx, ldsty, w, h, lsrcx, lsrcy);
}
}
rdpup_reset_clip();
rdpup_end_update();
@ -292,6 +276,8 @@ rdpCopyAreaPixmapToPixmap(PixmapPtr pSrcPixmap, rdpPixmapRec *pSrcPriv,
int cd;
int j;
int num_clips;
int dx;
int dy;
RegionPtr rv;
RegionRec clip_reg;
BoxRec box;
@ -325,8 +311,13 @@ rdpCopyAreaPixmapToPixmap(PixmapPtr pSrcPixmap, rdpPixmapRec *pSrcPriv,
{
rdpup_switch_os_surface(pDstPriv->rdpindex);
rdpup_begin_update();
dx = dstx - srcx;
dy = dsty - srcy;
LLOGLN(10, ("rdpCopyAreaPixmapToPixmap: num_clips %d", num_clips));
if ((dy < 0) || ((dy == 0) && (dx < 0)))
{
for (j = 0; j < num_clips; j++)
{
box = REGION_RECTS(&clip_reg)[j];
@ -334,6 +325,17 @@ rdpCopyAreaPixmapToPixmap(PixmapPtr pSrcPixmap, rdpPixmapRec *pSrcPriv,
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_end_update();

Loading…
Cancel
Save