diff options
author | Andrew Knight <andrew.knight@intopalo.com> | 2015-08-08 21:42:03 +0300 |
---|---|---|
committer | Andrew Knight <andrew.knight@intopalo.com> | 2015-08-13 16:12:10 +0000 |
commit | 130083a7fc07fb8f98e4199832b6c20685a1ea70 (patch) | |
tree | 1a90c13d05cc75d6964223b65eb3c575c8fc2b9f /src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h | |
parent | cea03fa3e3274023f4238de7fa5139275d4737fb (diff) |
ANGLE: Use pixel sizes in the XAML swap chain
This is necessary for Qt applications, as they render to GL in physical
pixels. This is consistent with the CoreWindow swap chain behavior.
This includes a partial revert of "ANGLE: Improve Windows Phone Support"
as the modifications to SwapChain11 are incompatible with the XAML swap
chain.
This change only affects Windows Runtime targets.
Change-Id: I401ae81028a9dfdb9da37f51c60844467c476f76
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Diffstat (limited to 'src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h')
-rw-r--r-- | src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h index 575bdf8a58..f0534077ae 100644 --- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h +++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h @@ -26,6 +26,8 @@ using namespace ABI::Windows::Foundation::Collections; namespace rx { +long ConvertDipsToPixels(float dips); + class InspectableNativeWindow { public: @@ -45,7 +47,7 @@ class InspectableNativeWindow virtual HRESULT createSwapChain(ID3D11Device *device, DXGIFactory *factory, DXGI_FORMAT format, unsigned int width, unsigned int height, DXGISwapChain **swapChain) = 0; virtual bool registerForSizeChangeEvents() = 0; virtual void unregisterForSizeChangeEvents() = 0; - virtual HRESULT scaleSwapChain(const SIZE& newSize) { return S_OK; } + virtual HRESULT scaleSwapChain(const Size& newSize) { return S_OK; } bool getClientRect(RECT *rect) { @@ -59,11 +61,11 @@ class InspectableNativeWindow return true; } - void setNewClientSize(const SIZE &newSize) + void setNewClientSize(const Size &newSize) { - if (mSupportsSwapChainResize && !mRequiresSwapChainScaling) + if (mSupportsSwapChainResize) { - mNewClientRect = { 0, 0, newSize.cx, newSize.cy }; + mNewClientRect = { 0, 0, ConvertDipsToPixels(newSize.Width), ConvertDipsToPixels(newSize.Height) }; mClientRectChanged = true; } |