Commit 2676fac9 by Cooper Partin Committed by Geoff Lang

Fixed invalid IsWindow( ) call for WinRT Windows Store applications.

Change-Id: Ic5f2aca0100a842be193cec9e89872187742f2c6 Reviewed-on: https://chromium-review.googlesource.com/238821Tested-by: 's avatarCooper Partin <coopp@microsoft.com> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent cd1db9e6
...@@ -72,7 +72,7 @@ egl::Error DisplayD3D::restoreLostDevice() ...@@ -72,7 +72,7 @@ egl::Error DisplayD3D::restoreLostDevice()
bool DisplayD3D::isValidNativeWindow(EGLNativeWindowType window) const bool DisplayD3D::isValidNativeWindow(EGLNativeWindowType window) const
{ {
return (IsWindow(window) == TRUE); return NativeWindow::isValidNativeWindow(window);
} }
} }
...@@ -54,6 +54,7 @@ class NativeWindow ...@@ -54,6 +54,7 @@ class NativeWindow
bool initialize(); bool initialize();
bool getClientRect(LPRECT rect); bool getClientRect(LPRECT rect);
bool isIconic(); bool isIconic();
static bool isValidNativeWindow(EGLNativeWindowType window);
HRESULT createSwapChain(ID3D11Device* device, DXGIFactory* factory, HRESULT createSwapChain(ID3D11Device* device, DXGIFactory* factory,
DXGI_FORMAT format, UINT width, UINT height, DXGI_FORMAT format, UINT width, UINT height,
......
...@@ -32,6 +32,11 @@ bool NativeWindow::isIconic() ...@@ -32,6 +32,11 @@ bool NativeWindow::isIconic()
return IsIconic(mWindow) == TRUE; return IsIconic(mWindow) == TRUE;
} }
bool NativeWindow::isValidNativeWindow(EGLNativeWindowType window)
{
return IsWindow(window) == TRUE;
}
HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory, HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory,
DXGI_FORMAT format, unsigned int width, unsigned int height, DXGI_FORMAT format, unsigned int width, unsigned int height,
DXGISwapChain** swapChain) DXGISwapChain** swapChain)
......
...@@ -74,6 +74,11 @@ bool NativeWindow::isIconic() ...@@ -74,6 +74,11 @@ bool NativeWindow::isIconic()
return false; return false;
} }
bool NativeWindow::isValidNativeWindow(EGLNativeWindowType window)
{
return IsValidEGLNativeWindowType(window);
}
HRESULT NativeWindow::createSwapChain(ID3D11Device *device, DXGIFactory *factory, DXGI_FORMAT format, unsigned int width, unsigned int height, DXGISwapChain **swapChain) HRESULT NativeWindow::createSwapChain(ID3D11Device *device, DXGIFactory *factory, DXGI_FORMAT format, unsigned int width, unsigned int height, DXGISwapChain **swapChain)
{ {
if (mImpl) if (mImpl)
......
...@@ -82,6 +82,7 @@ protected: ...@@ -82,6 +82,7 @@ protected:
EventRegistrationToken mSizeChangedEventToken; EventRegistrationToken mSizeChangedEventToken;
}; };
bool IsValidEGLNativeWindowType(EGLNativeWindowType window);
bool IsCoreWindow(EGLNativeWindowType window, ComPtr<ABI::Windows::UI::Core::ICoreWindow> *coreWindow = nullptr); bool IsCoreWindow(EGLNativeWindowType window, ComPtr<ABI::Windows::UI::Core::ICoreWindow> *coreWindow = nullptr);
bool IsSwapChainPanel(EGLNativeWindowType window, ComPtr<ABI::Windows::UI::Xaml::Controls::ISwapChainPanel> *swapChainPanel = nullptr); bool IsSwapChainPanel(EGLNativeWindowType window, ComPtr<ABI::Windows::UI::Xaml::Controls::ISwapChainPanel> *swapChainPanel = nullptr);
bool IsEGLConfiguredPropertySet(EGLNativeWindowType window, ABI::Windows::Foundation::Collections::IPropertySet **propertySet = nullptr, IInspectable **inspectable = nullptr); bool IsEGLConfiguredPropertySet(EGLNativeWindowType window, ABI::Windows::Foundation::Collections::IPropertySet **propertySet = nullptr, IInspectable **inspectable = nullptr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment