Commit 04461e81 authored by Frank Liberato's avatar Frank Liberato Committed by Commit Bot

Call SetTexture unconditionally in DefaultTextureWrapper.

GLImageDXGI should always have a d3d11 texture.  This CL sets the
texture unconditionally, even if an error occurs.  Since error
notification is asynchronous, the frame might still be drawn.

Bug: 1077645
Change-Id: I72c9aab078fcc8facb72870f5b9be30dc7cfa01d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2217857Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772522}
parent 152ee3a1
...@@ -259,14 +259,17 @@ void DefaultTexture2DWrapper::GpuResources::Init( ...@@ -259,14 +259,17 @@ void DefaultTexture2DWrapper::GpuResources::Init(
void DefaultTexture2DWrapper::GpuResources::PushNewTexture( void DefaultTexture2DWrapper::GpuResources::PushNewTexture(
ComD3D11Texture2D texture, ComD3D11Texture2D texture,
size_t array_slice) { size_t array_slice) {
// Notify |gl_image_| that it has a new texture. Do this unconditionally, so
// hat we can guarantee that the image isn't null. Nobody expects it to be,
// and failures will be noticed only asynchronously.
// https://crbug.com/1077645
gl_image_->SetTexture(texture, array_slice);
if (!helper_ || !helper_->MakeContextCurrent()) { if (!helper_ || !helper_->MakeContextCurrent()) {
NotifyError(StatusCode::kCantMakeContextCurrent); NotifyError(StatusCode::kCantMakeContextCurrent);
return; return;
} }
// Notify |gl_image_| that it has a new texture.
gl_image_->SetTexture(texture, array_slice);
// Notify angle that it has a new texture. // Notify angle that it has a new texture.
EGLAttrib frame_attributes[] = { EGLAttrib frame_attributes[] = {
EGL_D3D_TEXTURE_SUBRESOURCE_ID_ANGLE, EGL_D3D_TEXTURE_SUBRESOURCE_ID_ANGLE,
......
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