Commit bc78fc61 by Jiawei-Shao Committed by Commit Bot

Fix a compile error in SwapChain11.cpp

In function resetOffscreenColorBuffer, the local variable 'result' is never used in its scope, so when attempting to build a release version of Chromium with latest ANGLE on Windows, ninja will report a compile warning and stop the compilation: 'result': local variable is initialized but not referenced. The build failure starts at: https://chromium-review.googlesource.com/#/c/316804/ Change-Id: I29c05653f0d2e4f34c2e0402848f403ec2af8e5a Reviewed-on: https://chromium-review.googlesource.com/404515Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 77c13aaf
......@@ -204,7 +204,12 @@ EGLint SwapChain11::resetOffscreenColorBuffer(int backbufferWidth, int backbuffe
ID3D11Resource *tempResource11;
HRESULT result = device->OpenSharedResource(mShareHandle, __uuidof(ID3D11Resource),
(void **)&tempResource11);
ASSERT(SUCCEEDED(result));
if (FAILED(result))
{
ERR("Failed to open the swap chain pbuffer share handle: %08lX", result);
release();
return EGL_BAD_PARAMETER;
}
mOffscreenTexture = d3d11::DynamicCastComObject<ID3D11Texture2D>(tempResource11);
SafeRelease(tempResource11);
......
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