Use use_linux_video_acceleration flag in BUILD.gn to simplify files [chromium/src : main]

0 views
Skip to first unread message

Vikram Pasupathy (Gerrit)

unread,
Sep 24, 2025, 6:35:39 PM (2 days ago) Sep 24
to chromium...@chromium.org, Nico Weber, Miguel Casas-Sanchez, Chromium LUCI CQ, AyeAye, media-cro...@chromium.org, cc-...@chromium.org, chromeos-gfx-...@google.com, oshima...@chromium.org, hidehik...@chromium.org, yhanada+...@chromium.org, arc-review...@google.com, feature-me...@chromium.org
Attention needed from Miguel Casas-Sanchez and Nico Weber

Vikram Pasupathy added 1 comment

Patchset-level comments
File-level comment, Patchset 4:
Nico Weber . unresolved

This LG, but does use_linux_video_acceleration have to be an arg in https://source.chromium.org/chromium/chromium/src/+/main:media/gpu/args.gni;l=59?q=use_linux_video_acceleration%5C%20%3D%20case:yes ? That adds yet another state since that can be toggled independently of the other two.

Could we just put `use_linux_video_acceleration = use_vaapi || use_v4l2_codec` at the toplevel in that gni file outside of declare_args(), or do you really want people to be able to set that independent of the other two? If so, could we remove the other two args?

We have too many gn args and should be wary of adding more.

Vikram Pasupathy

@Miguel you're the Owner for this, do we allow people to be able to set that independent of the other two? Nico's suggestion makes sense to me, but just want to double check.

If so, would the same suggestion apply to `use_vaapi_image_codecs`?

Miguel Casas-Sanchez

I don't think it would make sense to enable `use_linux_video_acceleration`
without either the vaapi or v4l2 gn args. If the question is whether the
former can be moved to the same declare_args() as the latter two (i.e.
into [1]) then the answer is - likely yes, it might simply not have
been considered before.


[1] https://source.chromium.org/chromium/chromium/src/+/main:media/gpu/args.gni;l=7-36?q=use_linux_video_acceleration%5C%20%3D%20case:yes

Nico Weber

The question is "does it have to be an arg at all". Concretely, would this work:

```diff
diff --git a/media/gpu/args.gni b/media/gpu/args.gni
index 1cf51555d3348..22ecee80b5cc2 100644
--- a/media/gpu/args.gni
+++ b/media/gpu/args.gni
@@ -55,9 +55,7 @@ declare_args() {
use_vaapi_image_codecs = use_vaapi && is_chromeos
}

-declare_args() {
- use_linux_video_acceleration = use_vaapi || use_v4l2_codec
-}
+use_linux_video_acceleration = use_vaapi || use_v4l2_codec

declare_args() {
# A platform that is capable of hardware av1 decoding.
```
Nico Weber

(as in, "would it work for you". On a GN level, it does work.)

Vikram Pasupathy

@Miguel, I implemented Nico's suggestion. From what I understand, this would basically be so that you can't set `use_linux_video_acceleration` in the gn args, and that it would be set by either `use_vaapi` or `use_v412_codec`

Open in Gerrit

Related details

Attention is currently required from:
  • Miguel Casas-Sanchez
  • Nico Weber
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I9cd9caea201e390d3d0f13baced0f66d120e1177
Gerrit-Change-Number: 6945333
Gerrit-PatchSet: 6
Gerrit-Owner: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Reviewer: Miguel Casas-Sanchez <mca...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Attention: Nico Weber <tha...@chromium.org>
Gerrit-Attention: Miguel Casas-Sanchez <mca...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Sep 2025 22:35:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Weber <tha...@chromium.org>
Comment-In-Reply-To: Miguel Casas-Sanchez <mca...@chromium.org>
Comment-In-Reply-To: Vikram Pasupathy <vpasu...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Nico Weber (Gerrit)

unread,
Sep 24, 2025, 8:21:36 PM (2 days ago) Sep 24
to Vikram Pasupathy, Nico Weber, chromium...@chromium.org, Miguel Casas-Sanchez, Chromium LUCI CQ, AyeAye, media-cro...@chromium.org, cc-...@chromium.org, chromeos-gfx-...@google.com, oshima...@chromium.org, hidehik...@chromium.org, yhanada+...@chromium.org, arc-review...@google.com, feature-me...@chromium.org
Attention needed from Miguel Casas-Sanchez and Vikram Pasupathy

Nico Weber voted and added 1 comment

Votes added by Nico Weber

Code-Review+1
Owners-Override+1

1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Nico Weber . resolved

LG if Dale likes it. Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Miguel Casas-Sanchez
  • Vikram Pasupathy
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I9cd9caea201e390d3d0f13baced0f66d120e1177
Gerrit-Change-Number: 6945333
Gerrit-PatchSet: 6
Gerrit-Owner: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Reviewer: Miguel Casas-Sanchez <mca...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Attention: Miguel Casas-Sanchez <mca...@chromium.org>
Gerrit-Attention: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Comment-Date: Thu, 25 Sep 2025 00:21:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Vikram Pasupathy (Gerrit)

unread,
Sep 24, 2025, 11:34:17 PM (2 days ago) Sep 24
to Dale Curtis, Nico Weber, chromium...@chromium.org, Miguel Casas-Sanchez, Chromium LUCI CQ, AyeAye, media-cro...@chromium.org, cc-...@chromium.org, chromeos-gfx-...@google.com, oshima...@chromium.org, hidehik...@chromium.org, yhanada+...@chromium.org, arc-review...@google.com, feature-me...@chromium.org
Attention needed from Dale Curtis and Miguel Casas-Sanchez

Vikram Pasupathy added 1 comment

Patchset-level comments
Vikram Pasupathy . resolved

Hi Dale, ptal at the open comments to see if it makes sense. TY

Open in Gerrit

Related details

Attention is currently required from:
  • Dale Curtis
  • Miguel Casas-Sanchez
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I9cd9caea201e390d3d0f13baced0f66d120e1177
Gerrit-Change-Number: 6945333
Gerrit-PatchSet: 6
Gerrit-Owner: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Miguel Casas-Sanchez <mca...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Attention: Miguel Casas-Sanchez <mca...@chromium.org>
Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
Gerrit-Comment-Date: Thu, 25 Sep 2025 03:34:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Dale Curtis (Gerrit)

unread,
Sep 25, 2025, 12:25:36 PM (yesterday) Sep 25
to Vikram Pasupathy, Nico Weber, chromium...@chromium.org, Miguel Casas-Sanchez, Chromium LUCI CQ, AyeAye, media-cro...@chromium.org, cc-...@chromium.org, chromeos-gfx-...@google.com, oshima...@chromium.org, hidehik...@chromium.org, yhanada+...@chromium.org, arc-review...@google.com, feature-me...@chromium.org
Attention needed from Miguel Casas-Sanchez and Vikram Pasupathy

Dale Curtis voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Miguel Casas-Sanchez
  • Vikram Pasupathy
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I9cd9caea201e390d3d0f13baced0f66d120e1177
Gerrit-Change-Number: 6945333
Gerrit-PatchSet: 6
Gerrit-Owner: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Miguel Casas-Sanchez <mca...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Attention: Miguel Casas-Sanchez <mca...@chromium.org>
Gerrit-Attention: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Comment-Date: Thu, 25 Sep 2025 16:25:24 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Dale Curtis (Gerrit)

unread,
Sep 25, 2025, 12:26:47 PM (yesterday) Sep 25
to Vikram Pasupathy, Nico Weber, chromium...@chromium.org, Miguel Casas-Sanchez, Chromium LUCI CQ, AyeAye, media-cro...@chromium.org, cc-...@chromium.org, chromeos-gfx-...@google.com, oshima...@chromium.org, hidehik...@chromium.org, yhanada+...@chromium.org, arc-review...@google.com, feature-me...@chromium.org
Attention needed from Miguel Casas-Sanchez and Vikram Pasupathy

Dale Curtis added 1 comment

Patchset-level comments
Dale Curtis

Using it just as a var lgtm

Gerrit-Comment-Date: Thu, 25 Sep 2025 16:26:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Vikram Pasupathy (Gerrit)

unread,
Sep 25, 2025, 12:52:33 PM (yesterday) Sep 25
to Dale Curtis, Nico Weber, chromium...@chromium.org, Miguel Casas-Sanchez, Chromium LUCI CQ, AyeAye, media-cro...@chromium.org, cc-...@chromium.org, chromeos-gfx-...@google.com, oshima...@chromium.org, hidehik...@chromium.org, yhanada+...@chromium.org, arc-review...@google.com, feature-me...@chromium.org
Attention needed from Miguel Casas-Sanchez

Vikram Pasupathy voted and added 1 comment

Votes added by Vikram Pasupathy

Commit-Queue+2

1 comment

Patchset-level comments
File-level comment, Patchset 4:
Nico Weber . resolved
Vikram Pasupathy

Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Miguel Casas-Sanchez
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I9cd9caea201e390d3d0f13baced0f66d120e1177
Gerrit-Change-Number: 6945333
Gerrit-PatchSet: 6
Gerrit-Owner: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Miguel Casas-Sanchez <mca...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Attention: Miguel Casas-Sanchez <mca...@chromium.org>
Gerrit-Comment-Date: Thu, 25 Sep 2025 16:52:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Nico Weber <tha...@chromium.org>
Comment-In-Reply-To: Miguel Casas-Sanchez <mca...@chromium.org>
Comment-In-Reply-To: Dale Curtis <dalec...@chromium.org>
Comment-In-Reply-To: Vikram Pasupathy <vpasu...@chromium.org>
satisfied_requirement
open
diffy

Chromium LUCI CQ (Gerrit)

unread,
Sep 25, 2025, 12:55:35 PM (yesterday) Sep 25
to Vikram Pasupathy, Dale Curtis, Nico Weber, chromium...@chromium.org, Miguel Casas-Sanchez, AyeAye, media-cro...@chromium.org, cc-...@chromium.org, chromeos-gfx-...@google.com, oshima...@chromium.org, hidehik...@chromium.org, yhanada+...@chromium.org, arc-review...@google.com, feature-me...@chromium.org

Chromium LUCI CQ submitted the change

Change information

Commit message:
Use use_linux_video_acceleration flag in BUILD.gn to simplify files

Modify BUILD.gn files to use the previously defined arg
use_linux_video_acceleration to simplify and avoid clunky redefinitions.
Bug: 414459315
Change-Id: I9cd9caea201e390d3d0f13baced0f66d120e1177
Cq-Include-Trybots: luci.chromium.try:gpu-fyi-try-chromeos-amd64-generic
Commit-Queue: Vikram Pasupathy <vpasu...@chromium.org>
Reviewed-by: Nico Weber <tha...@chromium.org>
Reviewed-by: Dale Curtis <dalec...@chromium.org>
Owners-Override: Nico Weber <tha...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1520692}
Files:
  • M BUILD.gn
  • M chrome/gpu/BUILD.gn
  • M chromeos/ash/experiences/arc/video_accelerator/BUILD.gn
  • M components/chromeos_camera/BUILD.gn
  • M components/viz/service/BUILD.gn
  • M media/BUILD.gn
  • M media/gpu/BUILD.gn
  • M media/gpu/args.gni
  • M media/gpu/chromeos/BUILD.gn
  • M media/gpu/test/BUILD.gn
Change size: S
Delta: 10 files changed, 17 insertions(+), 24 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Dale Curtis, +1 by Nico Weber
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I9cd9caea201e390d3d0f13baced0f66d120e1177
Gerrit-Change-Number: 6945333
Gerrit-PatchSet: 7
Gerrit-Owner: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Miguel Casas-Sanchez <mca...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Vikram Pasupathy <vpasu...@chromium.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages