[ozone][gpu] Use SharedImageFormat in DrmModifiersFilter [chromium/src : main]

0 views
Skip to first unread message

Saifuddin Hitawala (Gerrit)

unread,
Aug 29, 2025, 11:28:53 AM (10 days ago) Aug 29
to Vasiliy Telezhnikov, Kramer Ge, Chromium LUCI CQ, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Kramer Ge and Vasiliy Telezhnikov

Saifuddin Hitawala added 1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Saifuddin Hitawala . resolved

Please take a look.

Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
  • Vasiliy Telezhnikov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not 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: Ife520795a43dc60c21e52d902a4ed363ad20f378
Gerrit-Change-Number: 6898357
Gerrit-PatchSet: 3
Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
Gerrit-Attention: Kramer Ge <fang...@chromium.org>
Gerrit-Attention: Vasiliy Telezhnikov <vas...@chromium.org>
Gerrit-Comment-Date: Fri, 29 Aug 2025 15:28:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Vasiliy Telezhnikov (Gerrit)

unread,
Aug 29, 2025, 11:36:00 AM (10 days ago) Aug 29
to Saifuddin Hitawala, Kramer Ge, Chromium LUCI CQ, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Kramer Ge and Saifuddin Hitawala

Vasiliy Telezhnikov voted and added 1 comment

Votes added by Vasiliy Telezhnikov

Code-Review+1

1 comment

Patchset-level comments
Vasiliy Telezhnikov . resolved

lgtm, thanks.

Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
  • Saifuddin Hitawala
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: Ife520795a43dc60c21e52d902a4ed363ad20f378
    Gerrit-Change-Number: 6898357
    Gerrit-PatchSet: 3
    Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
    Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
    Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
    Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
    Gerrit-Attention: Kramer Ge <fang...@chromium.org>
    Gerrit-Attention: Saifuddin Hitawala <hita...@chromium.org>
    Gerrit-Comment-Date: Fri, 29 Aug 2025 15:35:50 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Kramer Ge (Gerrit)

    unread,
    Sep 2, 2025, 11:23:02 AM (6 days ago) Sep 2
    to Saifuddin Hitawala, Vasiliy Telezhnikov, Chromium LUCI CQ, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
    Attention needed from Saifuddin Hitawala

    Kramer Ge added 3 comments

    Patchset-level comments
    Kramer Ge . resolved

    Sorry for the delay.

    File ui/ozone/platform/drm/gpu/mock_drm_modifiers_filter.cc
    Line 7, Patchset 3 (Latest):#include "components/viz/common/resources/shared_image_format.h"
    Kramer Ge . unresolved

    nit: this is a dup incl of header

    File ui/ozone/public/drm_modifiers_filter.h
    Line 13, Patchset 3 (Latest):class SharedImageFormat;
    Kramer Ge . unresolved

    this should not be a forward declaration.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Saifuddin Hitawala
    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: Ife520795a43dc60c21e52d902a4ed363ad20f378
      Gerrit-Change-Number: 6898357
      Gerrit-PatchSet: 3
      Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
      Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
      Gerrit-Attention: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Comment-Date: Tue, 02 Sep 2025 15:22:57 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Saifuddin Hitawala (Gerrit)

      unread,
      Sep 2, 2025, 11:47:56 AM (6 days ago) Sep 2
      to Vasiliy Telezhnikov, Kramer Ge, Chromium LUCI CQ, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
      Attention needed from Kramer Ge

      Saifuddin Hitawala added 3 comments

      Patchset-level comments
      File-level comment, Patchset 4 (Latest):
      Saifuddin Hitawala . resolved

      Address some feedback, also fixed setting PrefersExternalSampler as that was missing earlier.

      File ui/ozone/platform/drm/gpu/mock_drm_modifiers_filter.cc
      Line 7, Patchset 3:#include "components/viz/common/resources/shared_image_format.h"
      Kramer Ge . resolved

      nit: this is a dup incl of header

      Saifuddin Hitawala

      Sounds good, done.

      File ui/ozone/public/drm_modifiers_filter.h
      Line 13, Patchset 3:class SharedImageFormat;
      Kramer Ge . unresolved

      this should not be a forward declaration.

      Saifuddin Hitawala

      There's some chromium [guidance](https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++.md#forward-declarations-vs_includes) that states forward declarations are preferred although there was some work done around IWYU so I'm not sure.

      I'll keep it as is for now, as adding the header leads to adding to DEPS.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Kramer Ge
      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: Ife520795a43dc60c21e52d902a4ed363ad20f378
      Gerrit-Change-Number: 6898357
      Gerrit-PatchSet: 4
      Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
      Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
      Gerrit-Attention: Kramer Ge <fang...@chromium.org>
      Gerrit-Comment-Date: Tue, 02 Sep 2025 15:47:51 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Kramer Ge <fang...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Kramer Ge (Gerrit)

      unread,
      Sep 2, 2025, 1:08:41 PM (6 days ago) Sep 2
      to Saifuddin Hitawala, Vasiliy Telezhnikov, Chromium LUCI CQ, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
      Attention needed from Saifuddin Hitawala and Vasiliy Telezhnikov

      Kramer Ge voted and added 2 comments

      Votes added by Kramer Ge

      Code-Review+1

      2 comments

      File ui/ozone/platform/drm/gpu/DEPS
      Line 12, Patchset 3:specific_include_rules = {
      Kramer Ge . unresolved

      Wondering if there are motives to make `shared_image_format.h` more widely-available.

      File ui/ozone/public/drm_modifiers_filter.h
      Line 13, Patchset 3:class SharedImageFormat;
      Kramer Ge . unresolved

      this should not be a forward declaration.

      Saifuddin Hitawala

      There's some chromium [guidance](https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++.md#forward-declarations-vs_includes) that states forward declarations are preferred although there was some work done around IWYU so I'm not sure.

      I'll keep it as is for now, as adding the header leads to adding to DEPS.

      Kramer Ge

      Yes, although it is a pass-by-value in declaration so the compiler needs to know the size of `SharedImageFormat` when it sees a `Filter()` definition, which forces every definition to perform the `include`. In reality, the compiler didn't complain is because the actual definitions always include `shared_image_format.h`.

      I find no clear instructions on whether this is a good/bad practice, doing this declaration is just the same spirit to using [callback_forward.h](https://chromium.googlesource.com/chromium/src/+/HEAD/base/functional/callback_forward.h) to avoid inclusion headaches.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Saifuddin Hitawala
      • Vasiliy Telezhnikov
      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: Ife520795a43dc60c21e52d902a4ed363ad20f378
      Gerrit-Change-Number: 6898357
      Gerrit-PatchSet: 4
      Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
      Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
      Gerrit-Attention: Vasiliy Telezhnikov <vas...@chromium.org>
      Gerrit-Attention: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Comment-Date: Tue, 02 Sep 2025 17:08:35 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Kramer Ge <fang...@chromium.org>
      Comment-In-Reply-To: Saifuddin Hitawala <hita...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Saifuddin Hitawala (Gerrit)

      unread,
      Sep 2, 2025, 1:21:27 PM (6 days ago) Sep 2
      to Vasiliy Telezhnikov, Chromium LUCI CQ, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
      Attention needed from Vasiliy Telezhnikov

      Saifuddin Hitawala voted and added 3 comments

      Votes added by Saifuddin Hitawala

      Commit-Queue+2

      3 comments

      Patchset-level comments
      Saifuddin Hitawala . resolved

      Thanks for reviewing!

      File ui/ozone/platform/drm/gpu/DEPS
      Line 12, Patchset 3:specific_include_rules = {
      Kramer Ge . resolved

      Wondering if there are motives to make `shared_image_format.h` more widely-available.

      Saifuddin Hitawala

      Eventually we kinda want to use it in ui/ozone directly but trying to tackle usages other than ui/ozone for now. Or we might want to have NativePixmapFormat which will be scoped to ui/ozone similar to NativePixmapUsage, if we cannot use SharedImageFormat in ui/ozone for some reason. The primary motivation is to get rid of BufferFormat as that still represents something related to GMBs and there can be confusion on client-end since GMBs are handled by shared images now because of MappableSI.

      I did add it to BUILD file but for some reason gn check complained that include rules were missing and needed this.

      File ui/ozone/public/drm_modifiers_filter.h
      Line 13, Patchset 3:class SharedImageFormat;
      Kramer Ge . resolved

      this should not be a forward declaration.

      Saifuddin Hitawala

      There's some chromium [guidance](https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++.md#forward-declarations-vs_includes) that states forward declarations are preferred although there was some work done around IWYU so I'm not sure.

      I'll keep it as is for now, as adding the header leads to adding to DEPS.

      Kramer Ge

      Yes, although it is a pass-by-value in declaration so the compiler needs to know the size of `SharedImageFormat` when it sees a `Filter()` definition, which forces every definition to perform the `include`. In reality, the compiler didn't complain is because the actual definitions always include `shared_image_format.h`.

      I find no clear instructions on whether this is a good/bad practice, doing this declaration is just the same spirit to using [callback_forward.h](https://chromium.googlesource.com/chromium/src/+/HEAD/base/functional/callback_forward.h) to avoid inclusion headaches.

      Saifuddin Hitawala

      Right yeah, I guess in this case doing forward declaration doesn't make much sense.

      I can look more into it in follow-ups as I will likely need to handle ui/ozone DEPs again as most future conversions will involve ozone.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Vasiliy Telezhnikov
      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: Ife520795a43dc60c21e52d902a4ed363ad20f378
      Gerrit-Change-Number: 6898357
      Gerrit-PatchSet: 4
      Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
      Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
      Gerrit-Attention: Vasiliy Telezhnikov <vas...@chromium.org>
      Gerrit-Comment-Date: Tue, 02 Sep 2025 17:21:23 +0000
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Sep 2, 2025, 1:42:45 PM (6 days ago) Sep 2
      to Saifuddin Hitawala, Kramer Ge, Vasiliy Telezhnikov, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      [ozone][gpu] Use SharedImageFormat in DrmModifiersFilter

      As part of BufferFormat to SharedImageFormat conversions, convert
      DrmModifiersFilter and its subclasses to use SharedImageFormat instead
      of BufferFormat. Also update relevant callsites to use
      SharedImageFormat.
      Bug: 356649879
      Change-Id: Ife520795a43dc60c21e52d902a4ed363ad20f378
      Reviewed-by: Vasiliy Telezhnikov <vas...@chromium.org>
      Commit-Queue: Saifuddin Hitawala <hita...@chromium.org>
      Reviewed-by: Kramer Ge <fang...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1509652}
      Files:
      • M gpu/command_buffer/service/drm_modifiers_filter_dawn.cc
      • M gpu/command_buffer/service/drm_modifiers_filter_dawn.h
      • M gpu/command_buffer/service/drm_modifiers_filter_vulkan.cc
      • M gpu/command_buffer/service/drm_modifiers_filter_vulkan.h
      • M gpu/command_buffer/service/drm_modifiers_filter_vulkan_unittest.cc
      • M ui/ozone/platform/drm/BUILD.gn
      • M ui/ozone/platform/drm/gpu/DEPS
      • M ui/ozone/platform/drm/gpu/hardware_display_controller.cc
      • M ui/ozone/platform/drm/gpu/mock_drm_modifiers_filter.cc
      • M ui/ozone/platform/drm/gpu/mock_drm_modifiers_filter.h
      • M ui/ozone/platform/wayland/gpu/wayland_buffer_manager_gpu.cc
      • M ui/ozone/public/drm_modifiers_filter.h
      Change size: M
      Delta: 12 files changed, 53 insertions(+), 26 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Kramer Ge, +1 by Vasiliy Telezhnikov
      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: Ife520795a43dc60c21e52d902a4ed363ad20f378
      Gerrit-Change-Number: 6898357
      Gerrit-PatchSet: 5
      Gerrit-Owner: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
      Gerrit-Reviewer: Saifuddin Hitawala <hita...@chromium.org>
      Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages