Chromium Code Reviews| Index: content/common/gpu/media/gpu_video_decode_accelerator.cc |
| diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc |
| index df8ec5bc0ec8c72f35ba64dea56b0f1952197b62..fc8b4d892a6474c9defd53d68c68c90ea6a2c6a6 100644 |
| --- a/content/common/gpu/media/gpu_video_decode_accelerator.cc |
| +++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc |
| @@ -370,19 +370,25 @@ void GpuVideoDecodeAccelerator::OnAssignPictureBuffers( |
| NotifyError(media::VideoDecodeAccelerator::INVALID_ARGUMENT); |
| return; |
| } |
| + bool os_win = false; |
| + // FIXME: after moving to D3D11, remove this workaround. crbug.com/438691 |
| +#if defined(OS_WIN) |
| + os_win = true; |
| +#endif |
| if (texture_target_ == GL_TEXTURE_EXTERNAL_OES || |
| - texture_target_ == GL_TEXTURE_RECTANGLE) { |
| + texture_target_ == GL_TEXTURE_RECTANGLE || os_win) { |
| + GLenum format = os_win ? GL_BGRA_EXT : GL_RGBA; |
|
Ken Russell (switch to Gerrit)
2014/12/04 01:25:18
Please define some sort of API that is overridden
|
| // These textures have their dimensions defined by the underlying storage. |
| // Use |texture_dimensions_| for this size. |
| texture_manager->SetLevelInfo(texture_ref, |
| texture_target_, |
| 0, |
| - GL_RGBA, |
| + format, |
| texture_dimensions_.width(), |
| texture_dimensions_.height(), |
| 1, |
| 0, |
| - GL_RGBA, |
| + format, |
| 0, |
| false); |
| } else { |