Author: pschweitzer
Date: Fri May 26 08:31:10 2017
New Revision: 74665
URL:
http://svn.reactos.org/svn/reactos?rev=74665&view=rev
Log:
[GDIPLUS]
Import Wine commit (by Vincent Povirk):
- b8a8e1bde9382897927945ec0b58b8a2fcfcfe59, Check SHADEBLENDCAPS only for printer
devices.
In short, this avoids black boxes in GOG setup. This may help other software having
rendering issues due to alpha layer.
Modified:
trunk/reactos/dll/win32/gdiplus/graphics.c
Modified: trunk/reactos/dll/win32/gdiplus/graphics.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/graphics…
==============================================================================
--- trunk/reactos/dll/win32/gdiplus/graphics.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdiplus/graphics.c [iso-8859-1] Fri May 26 08:31:10 2017
@@ -320,7 +320,8 @@
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");
@@ -400,7 +401,8 @@
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