[flatland] Use Flatland Allocator only on its bound thread [chromium/src : main]

0 views
Skip to first unread message

Guocheng Wei (Gerrit)

unread,
Jul 13, 2026, 2:33:00 PM (10 days ago) Jul 13
to Zijie He, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, David Worsham, Robert Kroeger, emi...@google.com, fuchsia...@chromium.org, ozone-...@chromium.org, spang...@chromium.org
Attention needed from Zijie He

Guocheng Wei voted

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

Related details

Attention is currently required from:
  • Zijie He
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: Iaeda86ff60b1e7a62d6b5f38f5548e60e08c0a02
Gerrit-Change-Number: 8088277
Gerrit-PatchSet: 1
Gerrit-Owner: Guocheng Wei <guoch...@chromium.org>
Gerrit-Reviewer: Guocheng Wei <guoch...@chromium.org>
Gerrit-Reviewer: Zijie He <zij...@google.com>
Gerrit-CC: David Worsham <dwor...@google.com>
Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
Gerrit-Attention: Zijie He <zij...@google.com>
Gerrit-Comment-Date: Mon, 13 Jul 2026 18:32:47 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Zijie He (Gerrit)

unread,
Jul 15, 2026, 7:57:08 PM (8 days ago) Jul 15
to Guocheng Wei, Code Review Nudger, David Song, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, David Worsham, Robert Kroeger, emi...@google.com, fuchsia...@chromium.org, ozone-...@chromium.org, spang...@chromium.org
Attention needed from David Song and Guocheng Wei

Zijie He voted and added 1 comment

Votes added by Zijie He

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Zijie He . resolved

May wanna David take another look 😄

Open in Gerrit

Related details

Attention is currently required from:
  • David Song
  • Guocheng Wei
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: Iaeda86ff60b1e7a62d6b5f38f5548e60e08c0a02
    Gerrit-Change-Number: 8088277
    Gerrit-PatchSet: 1
    Gerrit-Owner: Guocheng Wei <guoch...@chromium.org>
    Gerrit-Reviewer: David Song <winter...@google.com>
    Gerrit-Reviewer: Guocheng Wei <guoch...@chromium.org>
    Gerrit-Reviewer: Zijie He <zij...@google.com>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-Attention: Guocheng Wei <guoch...@chromium.org>
    Gerrit-Attention: David Song <winter...@google.com>
    Gerrit-Comment-Date: Wed, 15 Jul 2026 23:56:54 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    David Song (Gerrit)

    unread,
    Jul 16, 2026, 2:40:38 PM (7 days ago) Jul 16
    to Guocheng Wei, Zijie He, Code Review Nudger, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, David Worsham, Robert Kroeger, emi...@google.com, fuchsia...@chromium.org, ozone-...@chromium.org, spang...@chromium.org
    Attention needed from Guocheng Wei

    David Song voted and added 1 comment

    Votes added by David Song

    Code-Review+1

    1 comment

    File ui/ozone/platform/flatland/flatland_sysmem_buffer_manager.cc
    Line 117, Patchset 1 (Latest): base::Unretained(this));
    David Song . resolved

    The lifecycle of the FlatlandSysmemBufferManager is unclear to me that I'm not sure if this `Unretained(this)` is safe. But looking at other parts of flatland, this seems to be common. Ideally we should look into making the flatland sysmem-related code thread-bound, but for now, this is OK with me.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Guocheng Wei
    Gerrit-Comment-Date: Thu, 16 Jul 2026 18:40:25 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    David Song (Gerrit)

    unread,
    Jul 21, 2026, 5:18:28 PM (2 days ago) Jul 21
    to Guocheng Wei, Zijie He, Code Review Nudger, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, David Worsham, Robert Kroeger, emi...@google.com, fuchsia...@chromium.org, ozone-...@chromium.org, spang...@chromium.org
    Attention needed from Guocheng Wei and Zijie He

    David Song voted

    Code-Review+1
    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Guocheng Wei
    • Zijie He
    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: Iaeda86ff60b1e7a62d6b5f38f5548e60e08c0a02
    Gerrit-Change-Number: 8088277
    Gerrit-PatchSet: 2
    Gerrit-Owner: Guocheng Wei <guoch...@chromium.org>
    Gerrit-Reviewer: David Song <winter...@google.com>
    Gerrit-Reviewer: Guocheng Wei <guoch...@chromium.org>
    Gerrit-Reviewer: Zijie He <zij...@google.com>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: David Worsham <dwor...@google.com>
    Gerrit-CC: Robert Kroeger <rjkr...@chromium.org>
    Gerrit-Attention: Guocheng Wei <guoch...@chromium.org>
    Gerrit-Attention: Zijie He <zij...@google.com>
    Gerrit-Comment-Date: Tue, 21 Jul 2026 21:18:18 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Jul 21, 2026, 5:56:22 PM (2 days ago) Jul 21
    to Guocheng Wei, David Song, Zijie He, Code Review Nudger, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, David Worsham, Robert Kroeger, emi...@google.com, fuchsia...@chromium.org, ozone-...@chromium.org, spang...@chromium.org

    Chromium LUCI CQ submitted the change

    Change information

    Commit message:
    [flatland] Use Flatland Allocator only on its bound thread

    FlatlandSysmemBufferManager binds its
    fuchsia::ui::composition::AllocatorPtr on the GPU main thread, but
    SurfaceFactoryOzone::CreateNativePixmap() may be called on any thread,
    which previously routed RegisterBufferCollection() to the proxy from the
    calling thread. fidl::InterfacePtr is not thread-safe.

    FlatlandSysmemBufferCollection now takes a callback to register with the
    Flatland allocator instead of a raw proxy pointer, and
    FlatlandSysmemBufferManager bounces the FIDL call onto the thread that
    bound the InterfacePtr.

    Add FlatlandSysmemBufferManagerTest covering same-thread and
    cross-thread registration.
    Fixed: 513129532
    Change-Id: Iaeda86ff60b1e7a62d6b5f38f5548e60e08c0a02
    Reviewed-by: David Song <winter...@google.com>
    Commit-Queue: David Song <winter...@google.com>
    Auto-Submit: Guocheng Wei <guoch...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1665818}
    Files:
    • M ui/ozone/platform/flatland/flatland_sysmem_buffer_collection.cc
    • M ui/ozone/platform/flatland/flatland_sysmem_buffer_collection.h
    • M ui/ozone/platform/flatland/flatland_sysmem_buffer_manager.cc
    • M ui/ozone/platform/flatland/flatland_sysmem_buffer_manager.h
    • M ui/ozone/platform/flatland/flatland_sysmem_buffer_manager_unittest.cc
    Change size: M
    Delta: 5 files changed, 170 insertions(+), 37 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by David Song
    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: Iaeda86ff60b1e7a62d6b5f38f5548e60e08c0a02
    Gerrit-Change-Number: 8088277
    Gerrit-PatchSet: 3
    Gerrit-Owner: Guocheng Wei <guoch...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: David Song <winter...@google.com>
    Gerrit-Reviewer: Guocheng Wei <guoch...@chromium.org>
    Gerrit-Reviewer: Zijie He <zij...@google.com>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages