Closed Bug 1695227 Opened 3 years ago Closed 11 months ago

[wayland] Set the OcclusionStateChanged() when inactive


(Core :: Widget: Gtk, enhancement, P3)




107 Branch
Tracking Status
firefox107 --- fixed


(Reporter: rmader, Assigned: stransky)


(Blocks 1 open bug, )



(1 file)

This is a follow up from

Inactive docshells also have other power-saving behaviors, like firing setTimeout at lower rates. It sounds like the wayland frame callback driven "deactivation" would not give you that benefit, it would only pause the refresh driver.

I see two possibilities to do this:

  1. add some heuristic around frame callbacks. For example in WaylandVsyncSource set the state to inactive if there hasn't been a callback for one second or so.
  2. Work out an explicit Wayland protocol for this, see

Note that the most pressing issue, suspending rendering, has already been fixed in bug 1629140

See Also: → 1786247

If you don't mind Robert I'm going to implement that on top of Bug 1786247. We may monitor frame callback rate for every window and send occlusion state when the window doesn't get any.

Assignee: robert.mader → stransky
Priority: -- → P3

Sure, please go ahead! I would have myself if I had more time :(

We may also set OcclusionStateChanged() if the window is minimized. In such case we're still getting frame callbacks (why?) but the window itself is hidden.

Pushed by
[Wayland] Set the OcclusionStateChanged() when inactive r=emilio
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
Regressions: 1795570
Regressions: 1795574
You need to log in before you can comment on or make changes to this bug.