Vincent Povirk : gdiplus: Check SHADEBLENDCAPS only for printer devices.
Alexandre Julliard
julliard at winehq.org
Mon May 22 15:54:06 CDT 2017
Module: wine
Branch: master
Commit: b8a8e1bde9382897927945ec0b58b8a2fcfcfe59
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b8a8e1bde9382897927945ec0b58b8a2fcfcfe59
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Mon May 22 13:20:58 2017 -0500
gdiplus: Check SHADEBLENDCAPS only for printer devices.
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/gdiplus/graphics.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 6c0d58d..815ffb0 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -324,7 +324,8 @@ static void transform_and_round_points(GpGraphics *graphics, POINT *pti,
static void gdi_alpha_blend(GpGraphics *graphics, INT dst_x, INT dst_y, INT dst_width, INT dst_height,
HDC hdc, INT src_x, INT src_y, INT src_width, INT src_height)
{
- if (GetDeviceCaps(graphics->hdc, SHADEBLENDCAPS) == SB_NONE)
+ if (GetDeviceCaps(graphics->hdc, TECHNOLOGY) == DT_RASPRINTER &&
+ GetDeviceCaps(graphics->hdc, SHADEBLENDCAPS) == SB_NONE)
{
TRACE("alpha blending not supported by device, fallback to StretchBlt\n");
@@ -404,7 +405,8 @@ static GpStatus alpha_blend_hdc_pixels(GpGraphics *graphics, INT dst_x, INT dst_
hbitmap = CreateDIBSection(hdc, (BITMAPINFO*)&bih, DIB_RGB_COLORS,
(void**)&temp_bits, NULL, 0);
- if (GetDeviceCaps(graphics->hdc, SHADEBLENDCAPS) == SB_NONE ||
+ if ((GetDeviceCaps(graphics->hdc, TECHNOLOGY) == DT_RASPRINTER &&
+ GetDeviceCaps(graphics->hdc, SHADEBLENDCAPS) == SB_NONE) ||
fmt & PixelFormatPAlpha)
memcpy(temp_bits, src, src_width * src_height * 4);
else
More information about the wine-cvs
mailing list