d2d1: Skip empty source rectangle for ID2D1RenderTarget_DrawBitmap().
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
757ce04917
commit
e2a7ee33d0
|
@ -1087,6 +1087,9 @@ static void d2d_device_context_draw_bitmap(struct d2d_device_context *context, I
|
|||
d2d_rect_intersect(&s, src_rect);
|
||||
}
|
||||
|
||||
if (s.left == s.right || s.top == s.bottom)
|
||||
return;
|
||||
|
||||
if (dst_rect)
|
||||
{
|
||||
d = *dst_rect;
|
||||
|
|
|
@ -1835,6 +1835,11 @@ static void test_bitmap_brush(void)
|
|||
/* Invalid interpolation mode. */
|
||||
ID2D1RenderTarget_BeginDraw(rt);
|
||||
|
||||
set_rect(&dst_rect, 4.0f, 8.0f, 8.0f, 12.0f);
|
||||
set_rect(&src_rect, 0.0f, 1.0f, image_size.width, 1.0f);
|
||||
ID2D1RenderTarget_DrawBitmap(rt, bitmap, &dst_rect, 1.0f,
|
||||
D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, &src_rect);
|
||||
|
||||
set_rect(&dst_rect, 1.0f, 8.0f, 4.0f, 12.0f);
|
||||
set_rect(&src_rect, 2.0f, 1.0f, 4.0f, 3.0f);
|
||||
ID2D1RenderTarget_DrawBitmap(rt, bitmap, &dst_rect, 1.0f,
|
||||
|
|
Loading…
Reference in New Issue