Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Firefox surface.frame event quirk #3740

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

RAOF
Copy link
Contributor

@RAOF RAOF commented Feb 6, 2025

We currently queue a send_frame_events() 16ms after receiving
a surface.commit() with no buffer but that requests a frame
event.

When send_frame_events() is triggered it sends all the frame
events at the time of trigger; this results in us sending frame
events at a sub-optimal time and breaks the way that WLCS uses
the frame event to determine when a buffer has been used.

Instead, maintain a separate heartbeat_quirk_frame_events list
that gets sent by the 16ms timer.

RAOF added 3 commits February 6, 2025 11:15
We want to move the `executor_send_frame_callback` into its
consumer; this obviously doesn't work if it's `const`.
We currently queue a `send_frame_events()` 16ms after receiving
a `surface.commit()` with no buffer but that requests a frame
event.

When `send_frame_events()` is triggered it sends *all* the frame
events at the time of trigger; this results in us sending frame
events at a sub-optimal time and breaks the way that WLCS uses
the frame event to determine when a buffer has been used.

Instead, maintain a separate `heartbeat_quirk_frame_events` list
that gets sent by the 16ms timer.
Oops! The `FrameExecutor` (annoyingly!) doesn't execute on the
Wayland event loop. We need a second bounce to get the
`send_frame_callbacks()` call there.
@RAOF RAOF requested a review from a team as a code owner February 6, 2025 06:09
@RAOF RAOF changed the title Mireng 952/improve firefox frame event quirk Improve Firefox surface.frame event quirk Feb 6, 2025
@RAOF
Copy link
Contributor Author

RAOF commented Feb 6, 2025

I think we might also want to fix issue #3739 while we're here, but I didn't want to block this on that. I've had a look, and it's not much work, but there's some subtlety around wl_event_loop lifetime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant