1From f1568e10c2bd46450adebbd838bd32e4833a0a5c Mon Sep 17 00:00:00 2001
2From: Oliver Wolff <oliver.wolff@qt.io>
3Date: Wed, 22 Aug 2018 13:32:44 +0200
4Subject: [PATCH 7/8] ANGLE: Fix resizing of windows
5
6Use the correct height/width values when calculating
7the vector for resizing the window content and the
8new size as viewport size.
9
10Task-number: QTBUG-62475
11Change-Id: I33a8dc1379a908e991b04bc31dfc6254a6d005c9
12---
13 .../src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp   | 19 +++++++++----------
14 1 file changed, 9 insertions(+), 10 deletions(-)
15
16diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
17index 05bb5d9863..dcfd06484d 100644
18--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
19+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
20@@ -796,16 +796,15 @@ EGLint SwapChain11::copyOffscreenToBackbuffer(const gl::Context *context,
21     d3d11::PositionTexCoordVertex *vertices = static_cast<d3d11::PositionTexCoordVertex*>(mappedResource.pData);
22
23     // Create a quad in homogeneous coordinates
24-    float x1 = (x / float(mWidth)) * 2.0f - 1.0f;
25-    float y1 = (y / float(mHeight)) * 2.0f - 1.0f;
26-    float x2 = ((x + width) / float(mWidth)) * 2.0f - 1.0f;
27-    float y2 = ((y + height) / float(mHeight)) * 2.0f - 1.0f;
28-
29-    float u1 = x / float(mWidth);
30-    float v1 = y / float(mHeight);
31-    float u2 = (x + width) / float(mWidth);
32-    float v2 = (y + height) / float(mHeight);
33-
34+    float x1 = (x / float(width)) * 2.0f - 1.0f;
35+    float y1 = (y / float(height)) * 2.0f - 1.0f;
36+    float x2 = ((x + width) / float(width)) * 2.0f - 1.0f;
37+    float y2 = ((y + height) / float(height)) * 2.0f - 1.0f;
38+
39+    float u1 = x / float(width);
40+    float v1 = y / float(height);
41+    float u2 = (x + width) / float(width);
42+    float v2 = (y + height) / float(height);
43     // Invert the quad vertices depending on the surface orientation.
44     if ((mOrientation & EGL_SURFACE_ORIENTATION_INVERT_X_ANGLE) != 0)
45     {
46--
472.15.0.windows.1
48
49