media: Declare GpuMojoMediaClient::gpu_memory_buffer_factory_ for ChromeOS only
GpuMojoMediaClient::gpu_memory_buffer_factory_ is guarded by BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION), however it is only used in the ChromeOS specific code path. This results in the following error if standard Chrome is built with use_vaapi=true or use_v4l2_codec=true on Linux: In file included from ../../media/mojo/services/gpu_mojo_media_client.cc:5: ../../media/mojo/services/gpu_mojo_media_client.h:77:38: error: private field 'gpu_memory_buffer_factory_' is not used [-Werror,-Wunused-private-field] gpu::GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; Add "defined(OS_CHROMEOS)" to the #ifs that guard the field declaration and assignment in the constructor to match the code path that uses it. Test: compile and run media_unittests with use_vaapi=true on Linux Test: compile and run media_unittests simplechrome (chromeos-amd64-generic-rel) Change-Id: Ic621272e06d4e5457572f1eadbd9f549638446a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1898280Reviewed-by:Dale Curtis <dalecurtis@chromium.org> Reviewed-by:
Jeffrey Kardatzke <jkardatzke@google.com> Reviewed-by:
Miguel Casas <mcasas@chromium.org> Commit-Queue: Dale Curtis <dalecurtis@chromium.org> Cr-Commit-Position: refs/heads/master@{#713143}
Showing
Please register or sign in to comment