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

0 views
Skip to first unread message

Miguel Casas-Sanchez (Gerrit)

unread,
Sep 12, 2025, 11:22:36 PM (10 days ago) Sep 12
to Vikram Pasupathy, 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 Vikram Pasupathy

Miguel Casas-Sanchez voted and added 1 comment

Votes added by Miguel Casas-Sanchez

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Miguel Casas-Sanchez . resolved

Low risk and clarifies the build. LGTM!

Open in Gerrit

Related details

Attention is currently required from:
  • Vikram Pasupathy
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: 4
Gerrit-Owner: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Reviewer: Miguel Casas-Sanchez <mca...@chromium.org>
Gerrit-Reviewer: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Attention: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Comment-Date: Sat, 13 Sep 2025 03:22:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Nico Weber (Gerrit)

unread,
Sep 15, 2025, 9:34:33 AM (8 days ago) Sep 15
to Vikram Pasupathy, Nico Weber, Pilar Molina Lopez, 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 Pilar Molina Lopez and Vikram Pasupathy

Nico Weber voted and added 2 comments

Votes added by Nico Weber

Code-Review+1

2 comments

Patchset-level comments
Nico Weber . resolved

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.

File media/BUILD.gn
Line 305, Patchset 4 (Latest): if (enable_av1_decoder && ((is_chromeos && (use_linux_video_acceleration)) ||
Nico Weber . unresolved

nit: drop now-needless parens around use_linux_video_acc

Open in Gerrit

Related details

Attention is currently required from:
  • Pilar Molina Lopez
  • Vikram Pasupathy
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: 4
    Gerrit-Owner: Vikram Pasupathy <vpasu...@chromium.org>
    Gerrit-Reviewer: Miguel Casas-Sanchez <mca...@chromium.org>
    Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
    Gerrit-Reviewer: Pilar Molina Lopez <pmolin...@chromium.org>
    Gerrit-Reviewer: Vikram Pasupathy <vpasu...@chromium.org>
    Gerrit-Attention: Pilar Molina Lopez <pmolin...@chromium.org>
    Gerrit-Attention: Vikram Pasupathy <vpasu...@chromium.org>
    Gerrit-Comment-Date: Mon, 15 Sep 2025 13:34:27 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Nico Weber (Gerrit)

    unread,
    Sep 15, 2025, 9:34:39 AM (8 days ago) Sep 15
    to Vikram Pasupathy, Nico Weber, Pilar Molina Lopez, 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 Pilar Molina Lopez and Vikram Pasupathy

    Nico Weber voted Owners-Override+1

    Owners-Override+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Pilar Molina Lopez
    • 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: 4
    Gerrit-Owner: Vikram Pasupathy <vpasu...@chromium.org>
    Gerrit-Reviewer: Miguel Casas-Sanchez <mca...@chromium.org>
    Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
    Gerrit-Reviewer: Pilar Molina Lopez <pmolin...@chromium.org>
    Gerrit-Reviewer: Vikram Pasupathy <vpasu...@chromium.org>
    Gerrit-Attention: Pilar Molina Lopez <pmolin...@chromium.org>
    Gerrit-Attention: Vikram Pasupathy <vpasu...@chromium.org>
    Gerrit-Comment-Date: Mon, 15 Sep 2025 13:34:33 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Vikram Pasupathy (Gerrit)

    unread,
    Sep 15, 2025, 10:14:37 AM (8 days ago) Sep 15
    to 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

    Vikram Pasupathy added 2 comments

    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`?

    File media/BUILD.gn
    Line 305, Patchset 4: if (enable_av1_decoder && ((is_chromeos && (use_linux_video_acceleration)) ||
    Nico Weber . resolved

    nit: drop now-needless parens around use_linux_video_acc

    Vikram Pasupathy

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • 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: 5
    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-Comment-Date: Mon, 15 Sep 2025 14:14:26 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Nico Weber <tha...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Miguel Casas-Sanchez (Gerrit)

    unread,
    Sep 19, 2025, 7:29:13 PM (3 days ago) Sep 19
    to Vikram Pasupathy, Nico Weber, 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 Vikram Pasupathy

    Miguel Casas-Sanchez voted and added 2 comments

    Votes added by Miguel Casas-Sanchez

    Code-Review+1

    2 comments

    Patchset-level comments
    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

    File-level comment, Patchset 5 (Latest):
    Miguel Casas-Sanchez . resolved

    (Still LGTM)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • 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: 5
    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: Vikram Pasupathy <vpasu...@chromium.org>
    Gerrit-Comment-Date: Fri, 19 Sep 2025 23:29:02 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Nico Weber <tha...@chromium.org>
    Comment-In-Reply-To: Vikram Pasupathy <vpasu...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Nico Weber (Gerrit)

    unread,
    Sep 20, 2025, 10:52:14 AM (3 days ago) Sep 20
    to Vikram Pasupathy, 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 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
    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.
    ```
    Open in Gerrit

    Related details

    Attention is currently required from:
    • 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: 5
    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: Vikram Pasupathy <vpasu...@chromium.org>
    Gerrit-Comment-Date: Sat, 20 Sep 2025 14:52:08 +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: Vikram Pasupathy <vpasu...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Nico Weber (Gerrit)

    unread,
    Sep 20, 2025, 10:52:29 AM (3 days ago) Sep 20
    to Vikram Pasupathy, 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 Vikram Pasupathy

    Nico Weber added 1 comment

    Patchset-level comments
    Nico Weber

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

    Open in Gerrit

    Related details

    Attention is currently required from:
    • 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: 5
    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: Vikram Pasupathy <vpasu...@chromium.org>
    Gerrit-Comment-Date: Sat, 20 Sep 2025 14:52:24 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages