Do not clip source rectangle even by visible region for bitblts.
Added field 'totalExtent' to WIN_DC_INFO.
This commit is contained in:
parent
ff1c569d5c
commit
27bb362fe1
|
@ -1043,9 +1043,10 @@ static BOOL32 BITBLT_GetVisRectangles( DC *dcDst, INT32 xDst, INT32 yDst,
|
||||||
SetRect32( &rect, xSrc, ySrc, xSrc + widthSrc, ySrc + heightSrc );
|
SetRect32( &rect, xSrc, ySrc, xSrc + widthSrc, ySrc + heightSrc );
|
||||||
if (widthSrc < 0) SWAP_INT32( &rect.left, &rect.right );
|
if (widthSrc < 0) SWAP_INT32( &rect.left, &rect.right );
|
||||||
if (heightSrc < 0) SWAP_INT32( &rect.top, &rect.bottom );
|
if (heightSrc < 0) SWAP_INT32( &rect.top, &rect.bottom );
|
||||||
/* Apparently the clip region is only for output, so use hVisRgn here */
|
/* Apparently the clipping and visible regions are only for output,
|
||||||
GetRgnBox32( dcSrc->w.hVisRgn, &clipRect );
|
so just check against totalExtent here to avoid BadMatch errors */
|
||||||
if (!IntersectRect32( visRectSrc, &rect, &clipRect )) return FALSE;
|
if (!IntersectRect32( visRectSrc, &rect, &dcSrc->w.totalExtent ))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
/* Intersect the rectangles */
|
/* Intersect the rectangles */
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,11 @@ HBITMAP32 X11DRV_BITMAP_SelectObject( DC * dc, HBITMAP32 hbitmap,
|
||||||
|
|
||||||
if (!(dc->w.flags & DC_MEMORY)) return 0;
|
if (!(dc->w.flags & DC_MEMORY)) return 0;
|
||||||
|
|
||||||
|
dc->w.totalExtent.left = 0;
|
||||||
|
dc->w.totalExtent.top = 0;
|
||||||
|
dc->w.totalExtent.right = bmp->bitmap.bmWidth;
|
||||||
|
dc->w.totalExtent.bottom = bmp->bitmap.bmHeight;
|
||||||
|
|
||||||
if (dc->w.hVisRgn)
|
if (dc->w.hVisRgn)
|
||||||
SetRectRgn32( dc->w.hVisRgn, 0, 0,
|
SetRectRgn32( dc->w.hVisRgn, 0, 0,
|
||||||
bmp->bitmap.bmWidth, bmp->bitmap.bmHeight );
|
bmp->bitmap.bmWidth, bmp->bitmap.bmHeight );
|
||||||
|
|
|
@ -178,8 +178,13 @@ static BOOL32 X11DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
|
||||||
physDev->drawable = bmp->pixmap;
|
physDev->drawable = bmp->pixmap;
|
||||||
physDev->gc = TSXCreateGC( display, physDev->drawable, 0, NULL );
|
physDev->gc = TSXCreateGC( display, physDev->drawable, 0, NULL );
|
||||||
dc->w.bitsPerPixel = bmp->bitmap.bmBitsPixel;
|
dc->w.bitsPerPixel = bmp->bitmap.bmBitsPixel;
|
||||||
dc->w.hVisRgn = CreateRectRgn32( 0, 0, bmp->bitmap.bmWidth,
|
|
||||||
bmp->bitmap.bmHeight );
|
dc->w.totalExtent.left = 0;
|
||||||
|
dc->w.totalExtent.top = 0;
|
||||||
|
dc->w.totalExtent.right = bmp->bitmap.bmWidth;
|
||||||
|
dc->w.totalExtent.bottom = bmp->bitmap.bmHeight;
|
||||||
|
dc->w.hVisRgn = CreateRectRgnIndirect32( &dc->w.totalExtent );
|
||||||
|
|
||||||
GDI_HEAP_UNLOCK( dc->w.hBitmap );
|
GDI_HEAP_UNLOCK( dc->w.hBitmap );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -187,7 +192,12 @@ static BOOL32 X11DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device,
|
||||||
physDev->drawable = rootWindow;
|
physDev->drawable = rootWindow;
|
||||||
physDev->gc = TSXCreateGC( display, physDev->drawable, 0, NULL );
|
physDev->gc = TSXCreateGC( display, physDev->drawable, 0, NULL );
|
||||||
dc->w.bitsPerPixel = screenDepth;
|
dc->w.bitsPerPixel = screenDepth;
|
||||||
dc->w.hVisRgn = CreateRectRgn32( 0, 0, screenWidth, screenHeight);
|
|
||||||
|
dc->w.totalExtent.left = 0;
|
||||||
|
dc->w.totalExtent.top = 0;
|
||||||
|
dc->w.totalExtent.right = screenWidth;
|
||||||
|
dc->w.totalExtent.bottom = screenHeight;
|
||||||
|
dc->w.hVisRgn = CreateRectRgnIndirect32( &dc->w.totalExtent );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dc->w.hVisRgn)
|
if (!dc->w.hVisRgn)
|
||||||
|
|
|
@ -122,6 +122,7 @@ typedef struct
|
||||||
short breakExtra; /* breakTotalExtra / breakCount */
|
short breakExtra; /* breakTotalExtra / breakCount */
|
||||||
short breakRem; /* breakTotalExtra % breakCount */
|
short breakRem; /* breakTotalExtra % breakCount */
|
||||||
|
|
||||||
|
RECT32 totalExtent;
|
||||||
BYTE bitsPerPixel;
|
BYTE bitsPerPixel;
|
||||||
|
|
||||||
INT32 MapMode;
|
INT32 MapMode;
|
||||||
|
|
|
@ -528,6 +528,7 @@ HDC16 WINAPI GetDCState( HDC16 hdc )
|
||||||
newdc->w.hFirstBitmap = dc->w.hFirstBitmap;
|
newdc->w.hFirstBitmap = dc->w.hFirstBitmap;
|
||||||
newdc->w.hDevice = dc->w.hDevice;
|
newdc->w.hDevice = dc->w.hDevice;
|
||||||
newdc->w.hPalette = dc->w.hPalette;
|
newdc->w.hPalette = dc->w.hPalette;
|
||||||
|
newdc->w.totalExtent = dc->w.totalExtent;
|
||||||
newdc->w.bitsPerPixel = dc->w.bitsPerPixel;
|
newdc->w.bitsPerPixel = dc->w.bitsPerPixel;
|
||||||
newdc->w.ROPmode = dc->w.ROPmode;
|
newdc->w.ROPmode = dc->w.ROPmode;
|
||||||
newdc->w.polyFillMode = dc->w.polyFillMode;
|
newdc->w.polyFillMode = dc->w.polyFillMode;
|
||||||
|
@ -613,6 +614,7 @@ void WINAPI SetDCState( HDC16 hdc, HDC16 hdcs )
|
||||||
dc->w.devCaps = dcs->w.devCaps;
|
dc->w.devCaps = dcs->w.devCaps;
|
||||||
dc->w.hFirstBitmap = dcs->w.hFirstBitmap;
|
dc->w.hFirstBitmap = dcs->w.hFirstBitmap;
|
||||||
dc->w.hDevice = dcs->w.hDevice;
|
dc->w.hDevice = dcs->w.hDevice;
|
||||||
|
dc->w.totalExtent = dcs->w.totalExtent;
|
||||||
dc->w.ROPmode = dcs->w.ROPmode;
|
dc->w.ROPmode = dcs->w.ROPmode;
|
||||||
dc->w.polyFillMode = dcs->w.polyFillMode;
|
dc->w.polyFillMode = dcs->w.polyFillMode;
|
||||||
dc->w.stretchBltMode = dcs->w.stretchBltMode;
|
dc->w.stretchBltMode = dcs->w.stretchBltMode;
|
||||||
|
|
Loading…
Reference in New Issue