gdi32: Forward StretchBlt calls from the dib driver to the null driver.
This commit is contained in:
parent
268b8382cd
commit
9b7ea6f417
|
@ -1113,3 +1113,23 @@ DWORD stretch_bitmapinfo( const BITMAPINFO *src_info, void *src_bits, struct bit
|
|||
offset_rect( &src->visrect, -src->visrect.left, -src->visrect.top );
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* dibdrv_StretchBlt
|
||||
*/
|
||||
BOOL dibdrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
|
||||
PHYSDEV src_dev, struct bitblt_coords *src, DWORD rop )
|
||||
{
|
||||
BOOL ret;
|
||||
DC *dc_dst = get_dc_ptr( dst_dev->hdc );
|
||||
|
||||
if (!dc_dst) return FALSE;
|
||||
|
||||
if (dst->width == 1 && src->width > 1) src->width--;
|
||||
if (dst->height == 1 && src->height > 1) src->height--;
|
||||
|
||||
ret = dc_dst->nulldrv.funcs->pStretchBlt( &dc_dst->nulldrv, dst,
|
||||
src_dev, src, rop );
|
||||
release_dc_ptr( dc_dst );
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -611,7 +611,7 @@ const DC_FUNCTIONS dib_driver =
|
|||
NULL, /* pSetWorldTransform */
|
||||
NULL, /* pStartDoc */
|
||||
NULL, /* pStartPage */
|
||||
NULL, /* pStretchBlt */
|
||||
dibdrv_StretchBlt, /* pStretchBlt */
|
||||
NULL, /* pStretchDIBits */
|
||||
NULL, /* pStrokeAndFillPath */
|
||||
NULL, /* pStrokePath */
|
||||
|
|
|
@ -116,6 +116,8 @@ extern HBRUSH dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush ) DECLSPEC_HIDDEN
|
|||
extern HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen ) DECLSPEC_HIDDEN;
|
||||
extern COLORREF dibdrv_SetDCBrushColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
||||
extern COLORREF dibdrv_SetDCPenColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
||||
extern BOOL dibdrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
|
||||
PHYSDEV src_dev, struct bitblt_coords *src, DWORD rop ) DECLSPEC_HIDDEN;
|
||||
|
||||
static inline dibdrv_physdev *get_dibdrv_pdev( PHYSDEV dev )
|
||||
{
|
||||
|
|
|
@ -2866,24 +2866,20 @@ static void test_StretchBlt(void)
|
|||
0, 0, 1, 1, 0, 0, 2, 1, expected, __LINE__);
|
||||
|
||||
expected[0] = srcBuffer[0] & srcBuffer[1];
|
||||
todo_wine
|
||||
check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer,
|
||||
0, 0, 1, 1, 0, 0, 3, 1, expected, __LINE__);
|
||||
|
||||
expected[0] = srcBuffer[0] & srcBuffer[1] & srcBuffer[2];
|
||||
todo_wine
|
||||
check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer,
|
||||
0, 0, 1, 1, 0, 0, 4, 1, expected, __LINE__);
|
||||
|
||||
/* this doesn't happen if the src width is -ve */
|
||||
expected[0] = srcBuffer[1] & srcBuffer[2];
|
||||
todo_wine
|
||||
check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer,
|
||||
0, 0, 1, 1, 2, 0, -2, 1, expected, __LINE__);
|
||||
|
||||
/* when dst width > 1 behaviour reverts to what one would expect */
|
||||
expected[0] = srcBuffer[0] & srcBuffer[1], expected[1] = srcBuffer[2] & srcBuffer[3];
|
||||
todo_wine
|
||||
check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer,
|
||||
0, 0, 2, 1, 0, 0, 4, 1, expected, __LINE__);
|
||||
|
||||
|
@ -2899,7 +2895,6 @@ todo_wine
|
|||
SetViewportExtEx( hdcDst, 100, 100, NULL );
|
||||
|
||||
expected[0] = srcBuffer[0] & srcBuffer[1] & srcBuffer[2];
|
||||
todo_wine
|
||||
check_StretchBlt_stretch(hdcDst, hdcSrc, &biDst, dstBuffer, srcBuffer,
|
||||
0, 0, 2, 2, 0, 0, 4, 1, expected, __LINE__);
|
||||
SetMapMode( hdcDst, MM_TEXT );
|
||||
|
|
Loading…
Reference in New Issue