spanification: automatically spanify ui/gfx/linux/client_native_pixmap_dmabuf.cc etc. [chromium/src : main]

0 views
Skip to first unread message

Roberto Torres (Gerrit)

unread,
Dec 12, 2025, 6:44:28 PM (9 days ago) Dec 12
to Colin Blundell, Stephen Nusko, AyeAye, Chromium LUCI CQ, ozone-...@chromium.org
Attention needed from Colin Blundell and Stephen Nusko

Roberto Torres voted

Auto-Submit+1
Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Colin Blundell
  • Stephen Nusko
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
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: I6b7f0add34b66b9a11e99f7abc99912e65993754
Gerrit-Change-Number: 7256880
Gerrit-PatchSet: 1
Gerrit-Owner: Roberto Torres <jr...@google.com>
Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
Gerrit-Reviewer: Roberto Torres <jr...@google.com>
Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
Gerrit-Attention: Stephen Nusko <nus...@chromium.org>
Gerrit-Attention: Colin Blundell <blun...@chromium.org>
Gerrit-Comment-Date: Fri, 12 Dec 2025 23:44:20 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Stephen Nusko (Gerrit)

unread,
Dec 14, 2025, 11:00:39 PM (7 days ago) Dec 14
to Roberto Torres, Colin Blundell, AyeAye, Chromium LUCI CQ, ozone-...@chromium.org
Attention needed from Colin Blundell and Roberto Torres

Stephen Nusko added 4 comments

File ui/gfx/linux/client_native_pixmap_dmabuf.h
Line 62, Patchset 2 (Latest): size_t size = 0;
Stephen Nusko . unresolved

Add a comment here explaining size is the size requested for `data`, I.E. the reason it says is PlaneInfo is constructed with only `offset` and `size` set and then later `data` is allocated with that information.

Basically I was confused if we could remove this (answer is no), because of the above. Feel free to reword but this should have a clarification comment.

Line 60, Patchset 2 (Latest): base::raw_span<uint8_t> data;
Stephen Nusko . unresolved

Also this seems strange to be a raw_span/raw_ptr... It is owned by PlaneInfo, deleted in its constructor.

What do you think about

```
base::HeapArray<uint8_t> data;
```

And using [FromOwningPointer](https://source.chromium.org/chromium/chromium/src/+/main:base/containers/heap_array.h;l=102;drc=a1d268ec0bc5f1b763bd8dfd373264a4d57ef00b) with a custom deleting_type that calls `munmap`?

Then the ownership is clearer, we don't need raw_span (avoiding the overhead of raw_ptr), and we still get bounds checking and .AsSpan() functions for safe access.

File ui/gfx/linux/client_native_pixmap_dmabuf.cc
Line 50, Patchset 2 (Latest): // `size_to_map` bytes.
Stephen Nusko . unresolved
Line 92, Patchset 2 (Latest): // Set nullptr to info.data in order not to call munmap in |info| dtor.
Stephen Nusko . unresolved

outdated comment

Open in Gerrit

Related details

Attention is currently required from:
  • Colin Blundell
  • Roberto Torres
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    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: I6b7f0add34b66b9a11e99f7abc99912e65993754
    Gerrit-Change-Number: 7256880
    Gerrit-PatchSet: 2
    Gerrit-Owner: Roberto Torres <jr...@google.com>
    Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
    Gerrit-Reviewer: Roberto Torres <jr...@google.com>
    Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
    Gerrit-Attention: Colin Blundell <blun...@chromium.org>
    Gerrit-Attention: Roberto Torres <jr...@google.com>
    Gerrit-Comment-Date: Mon, 15 Dec 2025 04:00:16 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Colin Blundell (Gerrit)

    unread,
    Dec 15, 2025, 2:44:39 AM (7 days ago) Dec 15
    to Roberto Torres, Stephen Nusko, AyeAye, Chromium LUCI CQ, ozone-...@chromium.org, Colin Blundell
    Attention needed from Roberto Torres

    Colin Blundell added 1 comment

    Patchset-level comments
    File-level comment, Patchset 2 (Latest):
    Colin Blundell . resolved

    Thanks! Please add me back once Stephen has LGTM'd.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Roberto Torres
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    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: I6b7f0add34b66b9a11e99f7abc99912e65993754
    Gerrit-Change-Number: 7256880
    Gerrit-PatchSet: 2
    Gerrit-Owner: Roberto Torres <jr...@google.com>
    Gerrit-Reviewer: Roberto Torres <jr...@google.com>
    Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
    Gerrit-Attention: Roberto Torres <jr...@google.com>
    Gerrit-Comment-Date: Mon, 15 Dec 2025 07:44:21 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Roberto Torres (Gerrit)

    unread,
    Dec 16, 2025, 1:39:25 AM (6 days ago) Dec 16
    to Stephen Nusko, AyeAye, Chromium LUCI CQ, ozone-...@chromium.org
    Attention needed from Stephen Nusko

    Roberto Torres added 4 comments

    File ui/gfx/linux/client_native_pixmap_dmabuf.h
    Line 62, Patchset 2: size_t size = 0;
    Stephen Nusko . resolved

    Add a comment here explaining size is the size requested for `data`, I.E. the reason it says is PlaneInfo is constructed with only `offset` and `size` set and then later `data` is allocated with that information.

    Basically I was confused if we could remove this (answer is no), because of the above. Feel free to reword but this should have a clarification comment.

    Roberto Torres

    Done

    Line 60, Patchset 2: base::raw_span<uint8_t> data;
    Stephen Nusko . resolved

    Also this seems strange to be a raw_span/raw_ptr... It is owned by PlaneInfo, deleted in its constructor.

    What do you think about

    ```
    base::HeapArray<uint8_t> data;
    ```

    And using [FromOwningPointer](https://source.chromium.org/chromium/chromium/src/+/main:base/containers/heap_array.h;l=102;drc=a1d268ec0bc5f1b763bd8dfd373264a4d57ef00b) with a custom deleting_type that calls `munmap`?

    Then the ownership is clearer, we don't need raw_span (avoiding the overhead of raw_ptr), and we still get bounds checking and .AsSpan() functions for safe access.

    Roberto Torres

    Marked as resolved.

    File ui/gfx/linux/client_native_pixmap_dmabuf.cc
    Line 50, Patchset 2: // `size_to_map` bytes.
    Stephen Nusko . resolved

    // See https://man7.org/linux/man-pages/man2/mmap.2.html

    Roberto Torres

    Done

    Line 92, Patchset 2: // Set nullptr to info.data in order not to call munmap in |info| dtor.
    Stephen Nusko . resolved

    outdated comment

    Roberto Torres

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Stephen Nusko
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      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: I6b7f0add34b66b9a11e99f7abc99912e65993754
      Gerrit-Change-Number: 7256880
      Gerrit-PatchSet: 6
      Gerrit-Owner: Roberto Torres <jr...@google.com>
      Gerrit-Reviewer: Roberto Torres <jr...@google.com>
      Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
      Gerrit-Attention: Stephen Nusko <nus...@chromium.org>
      Gerrit-Comment-Date: Tue, 16 Dec 2025 06:39:14 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Stephen Nusko <nus...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Stephen Nusko (Gerrit)

      unread,
      Dec 16, 2025, 1:45:16 AM (6 days ago) Dec 16
      to Roberto Torres, AyeAye, Chromium LUCI CQ, ozone-...@chromium.org
      Attention needed from Roberto Torres

      Stephen Nusko added 1 comment

      File ui/gfx/linux/client_native_pixmap_dmabuf.cc
      Line 269, Patchset 6 (Latest): plane_info_[plane].data.subspan(plane_info_[plane].offset).data());
      Stephen Nusko . unresolved

      can this subspan become an index acces + & operator?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Roberto Torres
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        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: I6b7f0add34b66b9a11e99f7abc99912e65993754
        Gerrit-Change-Number: 7256880
        Gerrit-PatchSet: 6
        Gerrit-Owner: Roberto Torres <jr...@google.com>
        Gerrit-Reviewer: Roberto Torres <jr...@google.com>
        Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
        Gerrit-Attention: Roberto Torres <jr...@google.com>
        Gerrit-Comment-Date: Tue, 16 Dec 2025 06:44:51 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Roberto Torres (Gerrit)

        unread,
        Dec 16, 2025, 11:23:54 AM (6 days ago) Dec 16
        to Stephen Nusko, AyeAye, Chromium LUCI CQ, ozone-...@chromium.org
        Attention needed from Stephen Nusko

        Roberto Torres voted and added 1 comment

        Votes added by Roberto Torres

        Auto-Submit+1
        Commit-Queue+1

        1 comment

        File ui/gfx/linux/client_native_pixmap_dmabuf.cc
        Line 269, Patchset 6: plane_info_[plane].data.subspan(plane_info_[plane].offset).data());
        Stephen Nusko . resolved

        can this subspan become an index acces + & operator?

        Roberto Torres

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Stephen Nusko
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedReview-Enforcement
          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: I6b7f0add34b66b9a11e99f7abc99912e65993754
          Gerrit-Change-Number: 7256880
          Gerrit-PatchSet: 7
          Gerrit-Owner: Roberto Torres <jr...@google.com>
          Gerrit-Reviewer: Roberto Torres <jr...@google.com>
          Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
          Gerrit-Attention: Stephen Nusko <nus...@chromium.org>
          Gerrit-Comment-Date: Tue, 16 Dec 2025 16:23:43 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Stephen Nusko <nus...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Colin Blundell (Gerrit)

          unread,
          Dec 16, 2025, 11:45:14 AM (6 days ago) Dec 16
          to Roberto Torres, Colin Blundell, Stephen Nusko, AyeAye, Chromium LUCI CQ, ozone-...@chromium.org
          Attention needed from Roberto Torres and Stephen Nusko

          Colin Blundell added 1 comment

          Patchset-level comments
          File-level comment, Patchset 7 (Latest):
          Colin Blundell . resolved

          I'll review after Stephen LGTM's, thanks!

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Roberto Torres
          • Stephen Nusko
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedReview-Enforcement
          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: I6b7f0add34b66b9a11e99f7abc99912e65993754
          Gerrit-Change-Number: 7256880
          Gerrit-PatchSet: 7
          Gerrit-Owner: Roberto Torres <jr...@google.com>
          Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
          Gerrit-Reviewer: Roberto Torres <jr...@google.com>
          Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
          Gerrit-Attention: Stephen Nusko <nus...@chromium.org>
          Gerrit-Attention: Roberto Torres <jr...@google.com>
          Gerrit-Comment-Date: Tue, 16 Dec 2025 16:44:58 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Stephen Nusko (Gerrit)

          unread,
          Dec 17, 2025, 3:07:54 AM (5 days ago) Dec 17
          to Roberto Torres, Colin Blundell, AyeAye, Chromium LUCI CQ, ozone-...@chromium.org
          Attention needed from Roberto Torres

          Stephen Nusko voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Roberto Torres
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            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: I6b7f0add34b66b9a11e99f7abc99912e65993754
            Gerrit-Change-Number: 7256880
            Gerrit-PatchSet: 7
            Gerrit-Owner: Roberto Torres <jr...@google.com>
            Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
            Gerrit-Reviewer: Roberto Torres <jr...@google.com>
            Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
            Gerrit-Attention: Roberto Torres <jr...@google.com>
            Gerrit-Comment-Date: Wed, 17 Dec 2025 08:07:18 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Colin Blundell (Gerrit)

            unread,
            Dec 17, 2025, 3:12:47 AM (5 days ago) Dec 17
            to Roberto Torres, Colin Blundell, Stephen Nusko, AyeAye, Chromium LUCI CQ, ozone-...@chromium.org
            Attention needed from Roberto Torres

            Colin Blundell voted and added 1 comment

            Votes added by Colin Blundell

            Code-Review+1
            Commit-Queue+2

            1 comment

            Patchset-level comments
            Colin Blundell . resolved

            Thanks! LGTM for OWNERS, defer to Stephen on the technical review.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Roberto Torres
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            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: I6b7f0add34b66b9a11e99f7abc99912e65993754
            Gerrit-Change-Number: 7256880
            Gerrit-PatchSet: 7
            Gerrit-Owner: Roberto Torres <jr...@google.com>
            Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
            Gerrit-Reviewer: Roberto Torres <jr...@google.com>
            Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
            Gerrit-Attention: Roberto Torres <jr...@google.com>
            Gerrit-Comment-Date: Wed, 17 Dec 2025 08:12:27 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            Chromium LUCI CQ (Gerrit)

            unread,
            Dec 17, 2025, 4:03:56 AM (5 days ago) Dec 17
            to Roberto Torres, Colin Blundell, Stephen Nusko, AyeAye, ozone-...@chromium.org

            Chromium LUCI CQ submitted the change

            Change information

            Commit message:
            spanification: automatically spanify ui/gfx/linux/client_native_pixmap_dmabuf.cc etc.

            This is the result of running the automatic spanification on linux and
            updating code to use and pass spans where size is known.

            The original patch was fully automated using script:
            //tools/clang/spanify/rewrite-multiple-platforms.sh -platforms=linux
            Then refined with gemini-cli

            gemini-run/batch-run-1761798078/group_87

            BUG=439964610
            Change-Id: I6b7f0add34b66b9a11e99f7abc99912e65993754
            Auto-Submit: Roberto Torres <jr...@google.com>
            Commit-Queue: Colin Blundell <blun...@chromium.org>
            Reviewed-by: Stephen Nusko <nus...@chromium.org>
            Reviewed-by: Colin Blundell <blun...@chromium.org>
            Cr-Commit-Position: refs/heads/main@{#1559796}
            Files:
            • M ui/gfx/linux/client_native_pixmap_dmabuf.cc
            • M ui/gfx/linux/client_native_pixmap_dmabuf.h
            Change size: M
            Delta: 2 files changed, 68 insertions(+), 37 deletions(-)
            Branch: refs/heads/main
            Submit Requirements:
            • requirement satisfiedCode-Review: +1 by Stephen Nusko, +1 by Colin Blundell
            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: I6b7f0add34b66b9a11e99f7abc99912e65993754
            Gerrit-Change-Number: 7256880
            Gerrit-PatchSet: 8
            Gerrit-Owner: Roberto Torres <jr...@google.com>
            Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
            open
            diffy
            satisfied_requirement
            Reply all
            Reply to author
            Forward
            0 new messages