Commit 98e343ab authored by Hidehiko Abe's avatar Hidehiko Abe Committed by Commit Bot

Use same condition for field declaration and its use.

cros_supported_configs_ is defined iff OS_CHROMEOS is defined.
However, it is used iff USE_CHROMEOS_MEDIA_ACCELERATION regardless of
OS_CHROMEOS.
This CL aligns the conditions.

BUG=1047719
TEST=Build locally.

Change-Id: I08fe8532c1778ff8c77c7a9d9cdd96ff2a83272f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2030924Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737459}
parent e19103c7
......@@ -157,7 +157,7 @@ GpuMojoMediaClient::GetSupportedVideoDecoderConfigs() {
supported_config_map[VideoDecoderImplementation::kAlternate] =
*d3d11_supported_configs_;
#elif BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
#elif defined(OS_CHROMEOS) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
if (base::FeatureList::IsEnabled(kChromeosVideoDecoder)) {
if (!cros_supported_configs_) {
cros_supported_configs_ =
......
......@@ -74,16 +74,13 @@ class GpuMojoMediaClient : public MojoMediaClient {
#if defined(OS_CHROMEOS) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
// Indirectly owned by GpuChildThread.
gpu::GpuMemoryBufferFactory* const gpu_memory_buffer_factory_;
base::Optional<SupportedVideoDecoderConfigs> cros_supported_configs_;
#endif // defined(OS_CHROMEOS) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
CdmProxyFactoryCB cdm_proxy_factory_cb_;
#if defined(OS_WIN)
base::Optional<SupportedVideoDecoderConfigs> d3d11_supported_configs_;
#endif // defined(OS_WIN)
#if defined(OS_CHROMEOS)
base::Optional<SupportedVideoDecoderConfigs> cros_supported_configs_;
#endif // defined(OS_CHROMEOS)
DISALLOW_COPY_AND_ASSIGN(GpuMojoMediaClient);
};
......
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