New issue
Advanced search Search tips

Issue 747252 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

media/gpu: convert config flags to use BUILDFLAG

Project Member Reported by acourbot@chromium.org, Jul 21 2017

Issue description

Declaring macros directly in .gn files is dangerous, as if the original macro disappears, dependent code using that definition will simply assume it is not defined and keep working.

Switch all such defines in media/gpu to use BUILDFLAG in order to avoid this, following the model of USE_VAAPI.
 
Status: Started (was: Assigned)
Proposed fix: https://chromium-review.googlesource.com/627961
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c326509ad54f1440e37869372fae194fef8f0c07

commit c326509ad54f1440e37869372fae194fef8f0c07
Author: Alexandre Courbot <acourbot@chromium.org>
Date: Wed Aug 30 16:32:30 2017

media/gpu: turn USE_V4L2_CODEC and USE_LIBV4L2 into build flags

Following the same model as USE_VAAPI, turn the USE_V4L2_CODEC and
USE_LIBV4L2 macros into BUILDFLAG parameters. This adds extra security
by making sure the macros are indeed defined when met in source files.

This also allows us to remove the gpu_config used in BUILD files, and to
harmonize the checks against V4L2 by consolidating them against
USE_V4L2_CODEC alone instead of a combination of OS_CHROMEOS &&
USE_V4L2_CODEC.

BUG= 747252 
TEST=Made sure Chrome and video tests compiled and run when V4L2 and
libva are set.

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I3824ab9a41b27b90f6366bcd5cf9655ed4a7cb29
Reviewed-on: https://chromium-review.googlesource.com/627961
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498493}
[modify] https://crrev.com/c326509ad54f1440e37869372fae194fef8f0c07/content/common/BUILD.gn
[modify] https://crrev.com/c326509ad54f1440e37869372fae194fef8f0c07/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
[modify] https://crrev.com/c326509ad54f1440e37869372fae194fef8f0c07/media/gpu/BUILD.gn
[modify] https://crrev.com/c326509ad54f1440e37869372fae194fef8f0c07/media/gpu/generic_v4l2_device.cc
[modify] https://crrev.com/c326509ad54f1440e37869372fae194fef8f0c07/media/gpu/generic_v4l2_device.h
[modify] https://crrev.com/c326509ad54f1440e37869372fae194fef8f0c07/media/gpu/gpu_video_decode_accelerator_factory.cc
[modify] https://crrev.com/c326509ad54f1440e37869372fae194fef8f0c07/media/gpu/gpu_video_decode_accelerator_factory.h
[modify] https://crrev.com/c326509ad54f1440e37869372fae194fef8f0c07/media/gpu/gpu_video_encode_accelerator_factory.cc
[modify] https://crrev.com/c326509ad54f1440e37869372fae194fef8f0c07/media/gpu/ipc/client/BUILD.gn
[modify] https://crrev.com/c326509ad54f1440e37869372fae194fef8f0c07/media/gpu/ipc/service/BUILD.gn
[modify] https://crrev.com/c326509ad54f1440e37869372fae194fef8f0c07/media/gpu/ipc/service/gpu_jpeg_decode_accelerator_factory_provider.cc
[modify] https://crrev.com/c326509ad54f1440e37869372fae194fef8f0c07/media/gpu/video_decode_accelerator_unittest.cc

Status: Fixed (was: Started)
Marking as fixed as CL merged.

Sign in to add a comment