Commit cf14b24b authored by Tuukka Toivonen's avatar Tuukka Toivonen Committed by Commit Bot

media/gpu/vaapi: fix VA-API on X11 after Ozone was enabled

The CL "X11 and Ozone: enable use_x11 and use_ozone"
enabled both USE_OZONE and USE_X11 in the same build.
(https://crrev.com/c/2315869)

The feature IsUsingOzonePlatform() should be used to
check whether Ozone is actually in use or not. VA-API
support code did not do it properly, breaking VA-API
with X11. This patch fixes that.

Bug: 1129978

Change-Id: I64232207dd30b8a88bed7c250abc4ec2019210d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2418379
Commit-Queue: Tuukka Toivonen <tuukka.toivonen@intel.com>
Reviewed-by: default avatarMaksim Sisov (GMT+3) <msisov@igalia.com>
Reviewed-by: default avatarTed Meyer <tmathmeyer@chromium.org>
Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810139}
parent 1538def3
......@@ -82,18 +82,18 @@ VaapiPictureFactory::GetVaapiImplementation(gl::GLImplementation gl_impl) {
uint32_t VaapiPictureFactory::GetGLTextureTarget() {
#if defined(USE_OZONE)
return GL_TEXTURE_EXTERNAL_OES;
#else
return GL_TEXTURE_2D;
if (features::IsUsingOzonePlatform())
return GL_TEXTURE_EXTERNAL_OES;
#endif
return GL_TEXTURE_2D;
}
gfx::BufferFormat VaapiPictureFactory::GetBufferFormat() {
#if defined(USE_OZONE)
return gfx::BufferFormat::YUV_420_BIPLANAR;
#else
return gfx::BufferFormat::RGBX_8888;
if (features::IsUsingOzonePlatform())
return gfx::BufferFormat::YUV_420_BIPLANAR;
#endif
return gfx::BufferFormat::RGBX_8888;
}
#if defined(USE_OZONE)
......
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