Commit c80c1367 authored by Ted Meyer's avatar Ted Meyer Committed by Commit Bot

Require specific support for vaapi image codecs

Enable buildflag USE_VAAPI_IMAGE_CODECS when we're not on linux and
still using vaapi.

Change-Id: Id46698262b81c262a8b92636d0373cba4ebb5b99
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2441959
Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816381}
parent 6b2597b4
...@@ -394,10 +394,10 @@ GpuServiceImpl::GpuServiceImpl( ...@@ -394,10 +394,10 @@ GpuServiceImpl::GpuServiceImpl(
} }
#endif #endif
#if BUILDFLAG(USE_VAAPI) #if BUILDFLAG(USE_VAAPI_IMAGE_CODECS)
image_decode_accelerator_worker_ = image_decode_accelerator_worker_ =
media::VaapiImageDecodeAcceleratorWorker::Create(); media::VaapiImageDecodeAcceleratorWorker::Create();
#endif #endif // BUILDFLAG(USE_VAAPI_IMAGE_CODECS)
#if defined(OS_APPLE) #if defined(OS_APPLE)
if (gpu_feature_info_.status_values[gpu::GPU_FEATURE_TYPE_METAL] == if (gpu_feature_info_.status_values[gpu::GPU_FEATURE_TYPE_METAL] ==
......
...@@ -16,6 +16,7 @@ buildflag_header("buildflags") { ...@@ -16,6 +16,7 @@ buildflag_header("buildflags") {
flags = [ flags = [
"USE_VAAPI=$use_vaapi", "USE_VAAPI=$use_vaapi",
"USE_VAAPI_IMAGE_CODECS=$use_vaapi_image_codecs",
"USE_V4L2_CODEC=$use_v4l2_codec", "USE_V4L2_CODEC=$use_v4l2_codec",
"USE_LIBV4L2=$use_v4lplugin", "USE_LIBV4L2=$use_v4lplugin",
] ]
......
...@@ -23,3 +23,11 @@ declare_args() { ...@@ -23,3 +23,11 @@ declare_args() {
# encrypted content with HW video decoders. # encrypted content with HW video decoders.
use_chromeos_protected_media = false use_chromeos_protected_media = false
} }
# GN requires args that depend on other args to be declared in successive
# declare_args() blocks.
declare_args() {
# VA-API also allows decoding of images, but we don't want to use this
# outside of chromeos, even if video decoding is enabled.
use_vaapi_image_codecs = use_vaapi && is_chromeos
}
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