BeginFrameSource implementation for Wayland [chromium/src : main]

3 views
Skip to first unread message

Mitchell Cohen (Gerrit)

unread,
Jan 21, 2026, 4:43:12 PMJan 21
to Kramer Ge, AyeAye, chromium...@chromium.org, Ian Vollick, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Kramer Ge

Mitchell Cohen added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Mitchell Cohen . unresolved

@fang...@chromium.org: I don't know exactly what it would take to get this production-ready or if it's even the right approach. Will comment on code where I have some questions I wasn't able to answer.

I based this on the existing classes and factory method and iOS implementation which has similar constraints (needing to go across process boundaries). It does seem to work, and I thought it might be a good starting point to investigate.

Run with `./chrome --enable-features=WaylandExternalBeginFrameSource --vmodule=begin_frame_source_wayland=1`.

Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
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: I5bc7a8c1e791e607ce854af59a1bca6286dbc418
Gerrit-Change-Number: 7507210
Gerrit-PatchSet: 1
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-Attention: Kramer Ge <fang...@chromium.org>
Gerrit-Comment-Date: Wed, 21 Jan 2026 21:43:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mitchell Cohen (Gerrit)

unread,
Jan 21, 2026, 4:56:40 PMJan 21
to Jonathan Ross, AyeAye, chromium...@chromium.org, Ian Vollick, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org

Mitchell Cohen added 4 comments

File ui/compositor/begin_frame_source_wayland.cc
Line 153, Patchset 1 (Latest): // There won't be a frame callback with no damage so schedule one.
Mitchell Cohen . unresolved

is this something that could be changed on the WaylandFrameManager side?

Line 161, Patchset 1 (Latest): // Safety fallback in case the frame callback doesn't arrive (e.g., window
Mitchell Cohen . unresolved

This fallback mechanism doesn't feel great to me and it's the part I struggled with the most in this PoC.

  • If it runs on every presentation feedback interval, or close to it, we basically end up reinventing a delay-based pacer, and Wayland frame callbacks are useless. - - But if it's on a longer delay, Chrome freezes while waiting for frame callbacks that never come (common when switching tabs).

So the current approach of frequently needing to schedule frames in OnBeginFrameAck conflicts with the idea of frames being event-driven. There's probably a more sophisticated way to deal with missing frame callbacks and/or to make sure fewer are dropped.

File ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h
Line 129, Patchset 1 (Latest): std::unique_ptr<ui::BeginFrameSourceWayland> begin_frame_source_;
Mitchell Cohen . unresolved

The tree host seems like a strange place to own this driver, and other platforms don't use it this way, but this placement had several advantages: the tree host can pre-configure the compositor to use the external frame source with existing params (that for some reason aren't used by other impls), and it has the earliest access to the compositor, PlatformWindow and Wayland extension.

File ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
Line 362, Patchset 1 (Latest): ui::GetWaylandToplevelExtension(*platform_window()) != nullptr;
Mitchell Cohen . unresolved

When I tried to enable the driver for all windows (not just toplevels) I ran into failed DCHECKs in the Viz process. That surprised me because each surface has its own compositor and paces its own frames. I was able to get it to work by removing the check and clearing the frame sink in Viz, but that change seemed too drastic and could not be contained to the PoC.

Open in Gerrit

Related details

Attention set is empty
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: I5bc7a8c1e791e607ce854af59a1bca6286dbc418
Gerrit-Change-Number: 7507210
Gerrit-PatchSet: 1
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-Comment-Date: Wed, 21 Jan 2026 21:56:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Kramer Ge (Gerrit)

unread,
Feb 17, 2026, 5:17:31 PMFeb 17
to Mitchell Cohen, Jonathan Ross, AyeAye, chromium...@chromium.org, Ian Vollick, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Mitchell Cohen

Kramer Ge added 3 comments

Patchset-level comments
Kramer Ge . resolved

Sorry for the delay. Some initial thoughts

File ui/compositor/begin_frame_source_wayland.cc
Line 153, Patchset 1 (Latest): // There won't be a frame callback with no damage so schedule one.
Mitchell Cohen . unresolved

is this something that could be changed on the WaylandFrameManager side?

Kramer Ge

I think if you want you can apply an empty commit in `waylandframemanager` in that case to manually trigger next `frame_callback`.

Line 161, Patchset 1 (Latest): // Safety fallback in case the frame callback doesn't arrive (e.g., window
Mitchell Cohen . unresolved

This fallback mechanism doesn't feel great to me and it's the part I struggled with the most in this PoC.

  • If it runs on every presentation feedback interval, or close to it, we basically end up reinventing a delay-based pacer, and Wayland frame callbacks are useless. - - But if it's on a longer delay, Chrome freezes while waiting for frame callbacks that never come (common when switching tabs).

So the current approach of frequently needing to schedule frames in OnBeginFrameAck conflicts with the idea of frames being event-driven. There's probably a more sophisticated way to deal with missing frame callbacks and/or to make sure fewer are dropped.

Kramer Ge

Like switch to delay-based beginframe that refers to present time interval, can switch back to callback-based when callback catches up to the most recent frame.

Does chrome freeze currently when switching tabs? I imagine the same issue exists as of now if frame callback does not come in time.

Open in Gerrit

Related details

Attention is currently required from:
  • Mitchell Cohen
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: I5bc7a8c1e791e607ce854af59a1bca6286dbc418
Gerrit-Change-Number: 7507210
Gerrit-PatchSet: 1
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-Attention: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Comment-Date: Tue, 17 Feb 2026 22:17:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mitchell Cohen <mitc...@agilebits.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Mitchell Cohen (Gerrit)

unread,
Mar 7, 2026, 8:15:16 PMMar 7
to Jonathan Ross, Kramer Ge, AyeAye, chromium...@chromium.org, Ian Vollick, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Kramer Ge

Mitchell Cohen added 1 comment

File ui/compositor/begin_frame_source_wayland.cc
Line 153, Patchset 1: // There won't be a frame callback with no damage so schedule one.
Mitchell Cohen . unresolved

is this something that could be changed on the WaylandFrameManager side?

Kramer Ge

I think if you want you can apply an empty commit in `waylandframemanager` in that case to manually trigger next `frame_callback`.

Mitchell Cohen

Thanks for this suggestion, I implemented the empty commit in patchset 4 and performance is much more consistent. It rarely falls back to the timer now (usually once when switching tabs).

Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
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: I5bc7a8c1e791e607ce854af59a1bca6286dbc418
Gerrit-Change-Number: 7507210
Gerrit-PatchSet: 4
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-Attention: Kramer Ge <fang...@chromium.org>
Gerrit-Comment-Date: Sun, 08 Mar 2026 01:15:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mitchell Cohen <mitc...@agilebits.com>
Comment-In-Reply-To: Kramer Ge <fang...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Mitchell Cohen (Gerrit)

unread,
Mar 8, 2026, 3:45:30 PMMar 8
to Jonathan Ross, Kramer Ge, AyeAye, chromium...@chromium.org, Ian Vollick, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Kramer Ge

Mitchell Cohen added 2 comments

Patchset-level comments
Mitchell Cohen . unresolved

@fang...@chromium.org: I don't know exactly what it would take to get this production-ready or if it's even the right approach. Will comment on code where I have some questions I wasn't able to answer.

I based this on the existing classes and factory method and iOS implementation which has similar constraints (needing to go across process boundaries). It does seem to work, and I thought it might be a good starting point to investigate.

Run with `./chrome --enable-features=WaylandExternalBeginFrameSource --vmodule=begin_frame_source_wayland=1`.

Mitchell Cohen

@fang...@chromium.org I added no-damage commits and presentation feedback and this works a lot better now.

I'm seeing promising performance in a lightly optimized build. The external frame source clearly performs better on a site with a high refresh rate animation (https://testufo.com/) on my 144hz display. The frequent vsync misses go away completely when I enable the flag:

Current default delay-based timer:

```
❯ ./out/Release/chrome
[2575752:2575752:0308/153547.234354:ERROR:chrome/browser/ui/views/user_education/impl/browser_user_education_interface_impl.cc:163] Attempting to show IPH IPH_ExtensionsMenu before browser initialization complete; IPH will not be shown.
[2575752:2575778:0308/153552.361774:ERROR:google_apis/gcm/engine/registration_request.cc:291] Registration response error message: DEPRECATED_ENDPOINT
[2575802:2575938:0308/153556.645870:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.03 ms
[2575802:2575938:0308/153556.766338:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.195 ms
[2575802:2575938:0308/153557.886113:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.002 ms
[2575802:2575938:0308/153558.406438:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.035 ms
[2575802:2575938:0308/153558.503106:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.082 ms
[2575802:2575938:0308/153559.143282:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.111 ms
[2575802:2575938:0308/153559.783466:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.037 ms
[2575802:2575938:0308/153600.063306:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.043 ms
[2575802:2575938:0308/153600.143264:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.193 ms
[2575802:2575938:0308/153600.663748:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.017 ms
[2575802:2575938:0308/153600.744175:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.113 ms
[2575802:2575938:0308/153601.384445:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.059 ms
[2575802:2575938:0308/153601.984590:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.062 ms
[2575802:2575938:0308/153602.641420:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.082 ms
[2575802:2575938:0308/153603.007525:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.067 ms
[2575802:2575938:0308/153603.144642:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.069 ms
[2575802:2575938:0308/153604.361920:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.002 ms
[2575802:2575938:0308/153604.481820:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.051 ms
[2575802:2575938:0308/153604.881989:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.045 ms
[2575802:2575938:0308/153605.641689:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.008 ms
[2575802:2575938:0308/153605.841712:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.062 ms
[2575802:2575938:0308/153606.043037:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.131 ms
[2575802:2575938:0308/153606.179438:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.011 ms
[2575802:2575938:0308/153606.299371:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.201 ms
[2575802:2575938:0308/153606.379519:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.077 ms
[2575802:2575938:0308/153606.562626:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.009 ms
[2575802:2575938:0308/153606.642455:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.061 ms
[2575802:2575938:0308/153606.802601:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.058 ms
[2575802:2575938:0308/153606.860069:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.003 ms
[2575802:2575938:0308/153607.282455:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.047 ms
[2575802:2575938:0308/153607.363061:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.11 ms
[2575802:2575938:0308/153608.562667:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.035 ms
[2575802:2575938:0308/153608.836783:ERROR:components/viz/service/display/display.cc:286] Frame latency is negative: -0.027 ms
^C[2575752:2575789:0308/153609.257804:ERROR:content/browser/browser_main_loop.cc:275] GLib: g_main_context_pop_thread_default: assertion 'stack != NULL' failed
QThreadStorage: entry 2 destroyed before end of thread 0x39fc026fe940
QThreadStorage: entry 1 destroyed before end of thread 0x39fc026fe940
```

New frame source:

```
❯ ./out/Release/chrome --enable-features=WaylandExternalBeginFrameSource
[2576157:2576157:0308/153617.687014:ERROR:chrome/browser/ui/views/user_education/impl/browser_user_education_interface_impl.cc:163] Attempting to show IPH IPH_ExtensionsMenu before browser initialization complete; IPH will not be shown.
[2576157:2576185:0308/153622.815586:ERROR:google_apis/gcm/engine/registration_request.cc:291] Registration response error message: DEPRECATED_ENDPOINT
[2576157:2576185:0308/153647.310875:ERROR:google_apis/gcm/engine/registration_request.cc:291] Registration response error message: DEPRECATED_ENDPOINT
[2576157:2576237:0308/153647.657540:ERROR:content/browser/browser_main_loop.cc:275] GLib: g_main_context_pop_thread_default: assertion 'stack != NULL' failed
[2576157:2576239:0308/153647.657539:ERROR:content/browser/browser_main_loop.cc:275] GLib: g_main_context_pop_thread_default: assertion 'stack != NULL' failed
[2576157:2576238:0308/153647.657540:ERROR:content/browser/browser_main_loop.cc:275] GLib: g_main_context_pop_thread_default: assertion 'stack != NULL' failed
^C[2576208:2576208:0308/153659.328258:ERROR:gpu/command_buffer/service/shared_image/shared_image_manager.cc:252] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
[2576157:2576195:0308/153659.468110:ERROR:content/browser/browser_main_loop.cc:275] GLib: g_main_context_pop_thread_default: assertion 'stack != NULL' failed
QThreadStorage: entry 2 destroyed before end of thread 0x3d5c004f9da0
QThreadStorage: entry 1 destroyed before end of thread 0x3d5c004f9da0
```

File ui/compositor/begin_frame_source_wayland.cc
Line 161, Patchset 1: // Safety fallback in case the frame callback doesn't arrive (e.g., window
Mitchell Cohen . unresolved

This fallback mechanism doesn't feel great to me and it's the part I struggled with the most in this PoC.

  • If it runs on every presentation feedback interval, or close to it, we basically end up reinventing a delay-based pacer, and Wayland frame callbacks are useless. - - But if it's on a longer delay, Chrome freezes while waiting for frame callbacks that never come (common when switching tabs).

So the current approach of frequently needing to schedule frames in OnBeginFrameAck conflicts with the idea of frames being event-driven. There's probably a more sophisticated way to deal with missing frame callbacks and/or to make sure fewer are dropped.

Kramer Ge

Like switch to delay-based beginframe that refers to present time interval, can switch back to callback-based when callback catches up to the most recent frame.

Does chrome freeze currently when switching tabs? I imagine the same issue exists as of now if frame callback does not come in time.

Mitchell Cohen

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
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: I5bc7a8c1e791e607ce854af59a1bca6286dbc418
Gerrit-Change-Number: 7507210
Gerrit-PatchSet: 5
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-Attention: Kramer Ge <fang...@chromium.org>
Gerrit-Comment-Date: Sun, 08 Mar 2026 19:45:24 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Kramer Ge (Gerrit)

unread,
Mar 10, 2026, 1:44:32 PMMar 10
to Mitchell Cohen, Jonathan Ross, AyeAye, chromium...@chromium.org, Ian Vollick, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Mitchell Cohen

Kramer Ge added 1 comment

Patchset-level comments
Kramer Ge

`Frame latency is negative` is a surprising message to me, it's supposed to mean draw timing is after swap timing but does not mean much to the wayland compositor latch. Unclear to me why this is printed.

Open in Gerrit

Related details

Attention is currently required from:
  • Mitchell Cohen
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: I5bc7a8c1e791e607ce854af59a1bca6286dbc418
Gerrit-Change-Number: 7507210
Gerrit-PatchSet: 6
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-Attention: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Comment-Date: Tue, 10 Mar 2026 17:44:26 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Mitchell Cohen (Gerrit)

unread,
Mar 10, 2026, 2:09:02 PMMar 10
to Jonathan Ross, Kramer Ge, AyeAye, chromium...@chromium.org, Ian Vollick, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Kramer Ge

Mitchell Cohen added 1 comment

Patchset-level comments
Mitchell Cohen

It only started appearing for me in recent versions of Chromium, so I think it's a new message, but what's interesting is that it occurs much less often when I enable this driver, especially after I added presentation feedback.

Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
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: I5bc7a8c1e791e607ce854af59a1bca6286dbc418
Gerrit-Change-Number: 7507210
Gerrit-PatchSet: 6
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-Attention: Kramer Ge <fang...@chromium.org>
Gerrit-Comment-Date: Tue, 10 Mar 2026 18:08:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mitchell Cohen <mitc...@agilebits.com>
Comment-In-Reply-To: Kramer Ge <fang...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Kramer Ge (Gerrit)

unread,
Mar 20, 2026, 5:03:32 PM (13 days ago) Mar 20
to Mitchell Cohen, Jonathan Ross, AyeAye, chromium...@chromium.org, Ian Vollick, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Mitchell Cohen

Kramer Ge added 3 comments

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Kramer Ge . resolved

Some initial thoughts

File ui/compositor/begin_frame_source_wayland.h
Line 1, Patchset 6 (Latest):// Copyright 2026 The Chromium Authors
Kramer Ge . unresolved

I think this should live inside `ui/ozone/platform/wayland/host/`.

File ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
Line 149, Patchset 6 (Latest): begin_frame_source_ = std::make_unique<ui::BeginFrameSourceWayland>(
Kramer Ge . unresolved

We want to hide the impl detail of the ozone platform.

I think it would better if we ask on the `platform_window()` to produce a `BeginFrameSource` extended by `BeginFrameSourceWayland`. life time is easier to manage if `platform_window()` owns the `begin_frame_source`.

This way you may also control that only toplevel can create the BF source.

Open in Gerrit

Related details

Attention is currently required from:
  • Mitchell Cohen
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: I5bc7a8c1e791e607ce854af59a1bca6286dbc418
Gerrit-Change-Number: 7507210
Gerrit-PatchSet: 6
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-Attention: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Comment-Date: Fri, 20 Mar 2026 21:03:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Kramer Ge (Gerrit)

unread,
Mar 24, 2026, 4:22:57 PM (9 days ago) Mar 24
to Mitchell Cohen, Jonathan Ross, AyeAye, chromium...@chromium.org, Ian Vollick, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Mitchell Cohen

Kramer Ge added 2 comments

File ui/ozone/platform/wayland/host/wayland_frame_manager.h
Line 304, Patchset 6 (Latest): base::ObserverList<WaylandFrameTimingObserver> frame_timing_observers_;
Kramer Ge . unresolved

`WaylandWindow` and `WaylandFrameManager` is 1:1, also 1:1 with `ui::Compositor`, so I did not expect more than 1 here.

May be the `WaylandBeginFrameSource` and `WaylandWindow` can be 1:N, where there is 1 `WBFS` per `WaylandWindow` tree.

File ui/ozone/platform/wayland/host/wayland_frame_manager.cc
Line 580, Patchset 6 (Latest): if (frame_callback_freeze_detected_ &&
Kramer Ge . unresolved

Do you know if the beginframessource is behaving ok when browser is being captured by say https://meet.google.com, and goes into minimize/restore states?

Gerrit-Comment-Date: Tue, 24 Mar 2026 20:22:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mitchell Cohen (Gerrit)

unread,
Mar 24, 2026, 8:21:49 PM (9 days ago) Mar 24
to Jonathan Ross, Kramer Ge, AyeAye, chromium...@chromium.org, Ian Vollick, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Kramer Ge

Mitchell Cohen added 1 comment

File ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
Line 149, Patchset 6 (Latest): begin_frame_source_ = std::make_unique<ui::BeginFrameSourceWayland>(
Kramer Ge . unresolved

We want to hide the impl detail of the ozone platform.

I think it would better if we ask on the `platform_window()` to produce a `BeginFrameSource` extended by `BeginFrameSourceWayland`. life time is easier to manage if `platform_window()` owns the `begin_frame_source`.

This way you may also control that only toplevel can create the BF source.

Mitchell Cohen

I originally placed `BeginFrameSourceWayland` in the ozone host, but there's a problem: it needs access to `ui::Compositor` to issue frames over mojo. (The iOS frame source works the same way, which is why it lives in `content/browser`.)

So we would need to remove the dependency on `ui/compositor` with a new delegate/interface for this to work. I can try it.

Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
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: I5bc7a8c1e791e607ce854af59a1bca6286dbc418
Gerrit-Change-Number: 7507210
Gerrit-PatchSet: 6
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-Attention: Kramer Ge <fang...@chromium.org>
Gerrit-Comment-Date: Wed, 25 Mar 2026 00:21:42 +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,
Mar 25, 2026, 10:59:20 AM (8 days ago) Mar 25
to Mitchell Cohen, Jonathan Ross, AyeAye, chromium...@chromium.org, Ian Vollick, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Mitchell Cohen

Kramer Ge added 1 comment

File ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
Line 149, Patchset 6 (Latest): begin_frame_source_ = std::make_unique<ui::BeginFrameSourceWayland>(
Kramer Ge . unresolved

We want to hide the impl detail of the ozone platform.

I think it would better if we ask on the `platform_window()` to produce a `BeginFrameSource` extended by `BeginFrameSourceWayland`. life time is easier to manage if `platform_window()` owns the `begin_frame_source`.

This way you may also control that only toplevel can create the BF source.

Mitchell Cohen

I originally placed `BeginFrameSourceWayland` in the ozone host, but there's a problem: it needs access to `ui::Compositor` to issue frames over mojo. (The iOS frame source works the same way, which is why it lives in `content/browser`.)

So we would need to remove the dependency on `ui/compositor` with a new delegate/interface for this to work. I can try it.

Kramer Ge

Ah that is unfortunate. I guess we should probably put it in `ui/base/wayland/` then.

Open in Gerrit

Related details

Attention is currently required from:
  • Mitchell Cohen
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: I5bc7a8c1e791e607ce854af59a1bca6286dbc418
Gerrit-Change-Number: 7507210
Gerrit-PatchSet: 6
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-Attention: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Comment-Date: Wed, 25 Mar 2026 14:59:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mitchell Cohen (Gerrit)

unread,
Mar 25, 2026, 11:36:34 AM (8 days ago) Mar 25
to Jonathan Ross, Kramer Ge, AyeAye, chromium...@chromium.org, Ian Vollick, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Kramer Ge

Mitchell Cohen added 1 comment

File ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
Line 149, Patchset 6 (Latest): begin_frame_source_ = std::make_unique<ui::BeginFrameSourceWayland>(
Kramer Ge . unresolved

We want to hide the impl detail of the ozone platform.

I think it would better if we ask on the `platform_window()` to produce a `BeginFrameSource` extended by `BeginFrameSourceWayland`. life time is easier to manage if `platform_window()` owns the `begin_frame_source`.

This way you may also control that only toplevel can create the BF source.

Mitchell Cohen

I originally placed `BeginFrameSourceWayland` in the ozone host, but there's a problem: it needs access to `ui::Compositor` to issue frames over mojo. (The iOS frame source works the same way, which is why it lives in `content/browser`.)

So we would need to remove the dependency on `ui/compositor` with a new delegate/interface for this to work. I can try it.

Kramer Ge

Ah that is unfortunate. I guess we should probably put it in `ui/base/wayland/` then.

Mitchell Cohen

It has the same problem, `ui/compositor` depends on `ui/base/wayland`. I don't see a place to move the frame source without increasing complexity.

The Linux tree host already makes decisions based on Wayland vs. X11 and decides whether the compositor should use an external mojo frame source, so I think this placement is more justified than it seems at first. (An abstraction on `PlatformWindow` would also not be used by any other platforms.)

The biggest problem is leaking logic about toplevels right? Maybe the best solution is to get the driver working with all types of windows. ;)

Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
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: I5bc7a8c1e791e607ce854af59a1bca6286dbc418
Gerrit-Change-Number: 7507210
Gerrit-PatchSet: 6
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-Attention: Kramer Ge <fang...@chromium.org>
Gerrit-Comment-Date: Wed, 25 Mar 2026 15:36:29 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Mitchell Cohen (Gerrit)

unread,
Mar 25, 2026, 11:58:18 AM (8 days ago) Mar 25
to Jonathan Ross, Kramer Ge, AyeAye, chromium...@chromium.org, Ian Vollick, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Kramer Ge

Mitchell Cohen added 1 comment

File ui/ozone/platform/wayland/host/wayland_frame_manager.cc
Line 580, Patchset 6 (Latest): if (frame_callback_freeze_detected_ &&
Kramer Ge . unresolved

Do you know if the beginframessource is behaving ok when browser is being captured by say https://meet.google.com, and goes into minimize/restore states?

Mitchell Cohen

Good question, it crashes when screen recording so I'll fine tune this more.

Gerrit-Comment-Date: Wed, 25 Mar 2026 15:58:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Kramer Ge <fang...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Mitchell Cohen (Gerrit)

unread,
Mar 26, 2026, 12:00:59 AM (8 days ago) Mar 26
to Jonathan Ross, Kramer Ge, AyeAye, chromium...@chromium.org, Ian Vollick, mfoltz+wa...@chromium.org, cc-...@chromium.org, jophba...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Kramer Ge

Mitchell Cohen added 1 comment

Patchset-level comments
File-level comment, Patchset 10 (Latest):
Mitchell Cohen . unresolved

@fang...@chromium.org, it took me a long time to figure out why this was crashing for non-toplevel windows, when screen recording, etc. The solution was really simple: the source ID counter just needed to start at 1 instead of 0. New `ExternalBeginFrameSourceMojo` instances have their `original_source_id_` set to 0 until they receive their first frame, so we have to avoid broadcasting on ID 0 to prevent conflicts.

With the most recent change everything works with screen sharing , and there don't seem to be any conflicts with the freeze logic because the no-damage frame callbacks do not have buffers and are not affected by the issue.

Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
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: I5bc7a8c1e791e607ce854af59a1bca6286dbc418
Gerrit-Change-Number: 7507210
Gerrit-PatchSet: 10
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-Attention: Kramer Ge <fang...@chromium.org>
Gerrit-Comment-Date: Thu, 26 Mar 2026 04:00:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mitchell Cohen (Gerrit)

unread,
Mar 26, 2026, 4:03:46 PM (7 days ago) Mar 26
to Jonathan Ross, Kramer Ge, AyeAye, chromium...@chromium.org, Ian Vollick, mfoltz+wa...@chromium.org, cc-...@chromium.org, jophba...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Kramer Ge

Mitchell Cohen added 1 comment

File ui/ozone/platform/wayland/host/wayland_frame_manager.h
Line 304, Patchset 6: base::ObserverList<WaylandFrameTimingObserver> frame_timing_observers_;
Kramer Ge . resolved

`WaylandWindow` and `WaylandFrameManager` is 1:1, also 1:1 with `ui::Compositor`, so I did not expect more than 1 here.

May be the `WaylandBeginFrameSource` and `WaylandWindow` can be 1:N, where there is 1 `WBFS` per `WaylandWindow` tree.

Mitchell Cohen

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
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: I5bc7a8c1e791e607ce854af59a1bca6286dbc418
Gerrit-Change-Number: 7507210
Gerrit-PatchSet: 11
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-Attention: Kramer Ge <fang...@chromium.org>
Gerrit-Comment-Date: Thu, 26 Mar 2026 20:03:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Kramer Ge <fang...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Mitchell Cohen (Gerrit)

unread,
Mar 30, 2026, 5:39:44 PM (3 days ago) Mar 30
to Jonathan Ross, Kramer Ge, AyeAye, chromium...@chromium.org, Ian Vollick, mfoltz+wa...@chromium.org, cc-...@chromium.org, jophba...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Kramer Ge

Mitchell Cohen added 1 comment

File ui/ozone/platform/wayland/host/wayland_frame_manager.cc
Line 580, Patchset 6: if (frame_callback_freeze_detected_ &&
Kramer Ge . resolved

Do you know if the beginframessource is behaving ok when browser is being captured by say https://meet.google.com, and goes into minimize/restore states?

Mitchell Cohen

Good question, it crashes when screen recording so I'll fine tune this more.

Mitchell Cohen

Done

Gerrit-Comment-Date: Mon, 30 Mar 2026 21:39:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Kramer Ge (Gerrit)

unread,
Mar 31, 2026, 1:27:08 PM (2 days ago) Mar 31
to Mitchell Cohen, Jonathan Ross, AyeAye, chromium...@chromium.org, Ian Vollick, mfoltz+wa...@chromium.org, cc-...@chromium.org, jophba...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Mitchell Cohen

Kramer Ge added 1 comment

File ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
Line 149, Patchset 6: begin_frame_source_ = std::make_unique<ui::BeginFrameSourceWayland>(
Kramer Ge . unresolved

We want to hide the impl detail of the ozone platform.

I think it would better if we ask on the `platform_window()` to produce a `BeginFrameSource` extended by `BeginFrameSourceWayland`. life time is easier to manage if `platform_window()` owns the `begin_frame_source`.

This way you may also control that only toplevel can create the BF source.

Mitchell Cohen

I originally placed `BeginFrameSourceWayland` in the ozone host, but there's a problem: it needs access to `ui::Compositor` to issue frames over mojo. (The iOS frame source works the same way, which is why it lives in `content/browser`.)

So we would need to remove the dependency on `ui/compositor` with a new delegate/interface for this to work. I can try it.

Kramer Ge

Ah that is unfortunate. I guess we should probably put it in `ui/base/wayland/` then.

Mitchell Cohen

It has the same problem, `ui/compositor` depends on `ui/base/wayland`. I don't see a place to move the frame source without increasing complexity.

The Linux tree host already makes decisions based on Wayland vs. X11 and decides whether the compositor should use an external mojo frame source, so I think this placement is more justified than it seems at first. (An abstraction on `PlatformWindow` would also not be used by any other platforms.)

The biggest problem is leaking logic about toplevels right? Maybe the best solution is to get the driver working with all types of windows. ;)

Kramer Ge

ozone platform specific code best stay inside ozone, which is why I think it's best to have the `platformwindow` create a generic `beginframesource`, so that `desktop_window_tree_host_linux` does not have to include a `wayland` class. I think we should break the direct dependency unfortunately.

Open in Gerrit

Related details

Attention is currently required from:
  • Mitchell Cohen
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: I5bc7a8c1e791e607ce854af59a1bca6286dbc418
Gerrit-Change-Number: 7507210
Gerrit-PatchSet: 12
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-Attention: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Comment-Date: Tue, 31 Mar 2026 17:27:01 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Mitchell Cohen (Gerrit)

unread,
Mar 31, 2026, 11:41:26 PM (2 days ago) Mar 31
to Jonathan Ross, Kramer Ge, AyeAye, chromium...@chromium.org, Ian Vollick, mfoltz+wa...@chromium.org, cc-...@chromium.org, jophba...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, jbauma...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Kramer Ge

Mitchell Cohen added 1 comment

File ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
Line 149, Patchset 6: begin_frame_source_ = std::make_unique<ui::BeginFrameSourceWayland>(
Kramer Ge . unresolved

We want to hide the impl detail of the ozone platform.

I think it would better if we ask on the `platform_window()` to produce a `BeginFrameSource` extended by `BeginFrameSourceWayland`. life time is easier to manage if `platform_window()` owns the `begin_frame_source`.

This way you may also control that only toplevel can create the BF source.

Mitchell Cohen

I originally placed `BeginFrameSourceWayland` in the ozone host, but there's a problem: it needs access to `ui::Compositor` to issue frames over mojo. (The iOS frame source works the same way, which is why it lives in `content/browser`.)

So we would need to remove the dependency on `ui/compositor` with a new delegate/interface for this to work. I can try it.

Kramer Ge

Ah that is unfortunate. I guess we should probably put it in `ui/base/wayland/` then.

Mitchell Cohen

It has the same problem, `ui/compositor` depends on `ui/base/wayland`. I don't see a place to move the frame source without increasing complexity.

The Linux tree host already makes decisions based on Wayland vs. X11 and decides whether the compositor should use an external mojo frame source, so I think this placement is more justified than it seems at first. (An abstraction on `PlatformWindow` would also not be used by any other platforms.)

The biggest problem is leaking logic about toplevels right? Maybe the best solution is to get the driver working with all types of windows. ;)

Kramer Ge

ozone platform specific code best stay inside ozone, which is why I think it's best to have the `platformwindow` create a generic `beginframesource`, so that `desktop_window_tree_host_linux` does not have to include a `wayland` class. I think we should break the direct dependency unfortunately.

Mitchell Cohen

OK, I got this working nicely in patchset 13. I chose to implement a separate `PlatformWindow` extension and created an adapter in `ui/compositor` to use as a delegate. This made it possible to move the frame source over to `WaylandWindow` and remove all special code from the Linux tree host, at the cost of two small abstractions.

Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
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: I5bc7a8c1e791e607ce854af59a1bca6286dbc418
Gerrit-Change-Number: 7507210
Gerrit-PatchSet: 13
Gerrit-Owner: Mitchell Cohen <mitc...@agilebits.com>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-CC: Ian Vollick <vol...@chromium.org>
Gerrit-CC: Jonathan Ross <jon...@chromium.org>
Gerrit-Attention: Kramer Ge <fang...@chromium.org>
Gerrit-Comment-Date: Wed, 01 Apr 2026 03:41:16 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages