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/SwapChainPanelNativeWindow.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/SwapChainPanelNativeWindow.h')
-rw-r--r-- | src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h index caf327d913..5debd2fd0b 100644 --- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h +++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h @@ -22,7 +22,7 @@ class SwapChainPanelNativeWindow : public InspectableNativeWindow, public std::e bool registerForSizeChangeEvents(); void unregisterForSizeChangeEvents(); HRESULT createSwapChain(ID3D11Device *device, DXGIFactory *factory, DXGI_FORMAT format, unsigned int width, unsigned int height, DXGISwapChain **swapChain); - HRESULT scaleSwapChain(const SIZE &newSize); + HRESULT scaleSwapChain(const Size &newSize) override; private: ComPtr<ABI::Windows::UI::Xaml::Controls::ISwapChainPanel> mSwapChainPanel; @@ -62,8 +62,7 @@ class SwapChainPanelSizeChangedHandler : HRESULT result = sizeChangedEventArgs->get_NewSize(&newSize); if (SUCCEEDED(result)) { - SIZE windowSize = { lround(newSize.Width), lround(newSize.Height) }; - host->setNewClientSize(windowSize); + host->setNewClientSize(newSize); } } @@ -74,6 +73,6 @@ class SwapChainPanelSizeChangedHandler : std::weak_ptr<InspectableNativeWindow> mHost; }; -HRESULT GetSwapChainPanelSize(const ComPtr<ABI::Windows::UI::Xaml::Controls::ISwapChainPanel> &swapChainPanel, RECT *windowSize); +HRESULT GetSwapChainPanelSize(const ComPtr<ABI::Windows::UI::Xaml::Controls::ISwapChainPanel> &swapChainPanel, RECT *windowSize, bool *scalingActive = nullptr); } #endif // LIBANGLE_RENDERER_D3D_D3D11_WINRT_SWAPCHAINPANELNATIVEWINDOW_H_ |