Commit 20c46284 by Jeff Gilbert Committed by Commit Bot

Make OpenSharedResource() call become fallible in SwapChain11::resetOffscreenColorBuffer().

Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1415754 BUG=angleproject:2367 Change-Id: I69a75c38c6811752df6da9c3cba5901c9d8ab8c4 Reviewed-on: https://chromium-review.googlesource.com/935281Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent ad661940
...@@ -213,7 +213,12 @@ EGLint SwapChain11::resetOffscreenColorBuffer(const gl::Context *context, ...@@ -213,7 +213,12 @@ EGLint SwapChain11::resetOffscreenColorBuffer(const gl::Context *context,
ID3D11Resource *tempResource11; ID3D11Resource *tempResource11;
HRESULT result = device->OpenSharedResource(mShareHandle, __uuidof(ID3D11Resource), HRESULT result = device->OpenSharedResource(mShareHandle, __uuidof(ID3D11Resource),
(void **)&tempResource11); (void **)&tempResource11);
ASSERT(SUCCEEDED(result)); if (FAILED(result))
{
ERR() << "Could not open shared handle. " << gl::FmtHR(result);
release();
return EGL_BAD_SURFACE;
}
mOffscreenTexture.set(d3d11::DynamicCastComObject<ID3D11Texture2D>(tempResource11), mOffscreenTexture.set(d3d11::DynamicCastComObject<ID3D11Texture2D>(tempResource11),
backbufferFormatInfo); backbufferFormatInfo);
......
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