Added patch to ignore externally set DC state in gdiplus.

This commit is contained in:
Sebastian Lackner
2016-12-26 17:43:42 +01:00
parent 08fc972c37
commit ffccd4f5dd
4 changed files with 79 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
From 36195993f4774dc100437f2aef60201041ee752a Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Mon, 26 Dec 2016 21:17:29 +0800
Subject: gdiplus: Ignore an externally set DC origin.
gdiplus maintains its own graphics state.
FIXME: perhaps some other places need a similar fix.
---
dlls/gdiplus/graphics.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index f9a6f3e..e086dfc 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -497,6 +497,8 @@ static GpStatus alpha_blend_pixels_hrgn(GpGraphics *graphics, INT dst_x, INT dst
save = SaveDC(graphics->hdc);
+ SetViewportOrgEx(graphics->hdc, 0, 0, NULL);
+
if (hrgn)
ExtSelectClipRgn(graphics->hdc, hrgn, RGN_AND);
--
2.9.0

View File

@@ -0,0 +1,29 @@
From c1d9a2c8a3b018f3b5c244d62c3515e2f5a47d49 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Mon, 26 Dec 2016 21:22:02 +0800
Subject: gdiplus: Ignore an externally set DC clipping region.
gdiplus maintains its own graphics state.
FIXME: perhaps some other places need a similar fix.
---
dlls/gdiplus/graphics.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index e086dfc..47b7bda 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -499,8 +499,7 @@ static GpStatus alpha_blend_pixels_hrgn(GpGraphics *graphics, INT dst_x, INT dst
SetViewportOrgEx(graphics->hdc, 0, 0, NULL);
- if (hrgn)
- ExtSelectClipRgn(graphics->hdc, hrgn, RGN_AND);
+ ExtSelectClipRgn(graphics->hdc, hrgn, RGN_COPY);
if (hregion)
ExtSelectClipRgn(graphics->hdc, hregion, RGN_AND);
--
2.9.0

View File

@@ -0,0 +1 @@
Fixes: [35372] Ignore externally set DC state in gdiplus