Closed Bug 1695227 Opened 3 years ago Closed 2 years ago

[wayland] Set the OcclusionStateChanged() when inactive

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
107 Branch
Tracking Status
firefox107 --- fixed

People

(Reporter: rmader, Assigned: stransky)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

This is a follow up from https://bugzilla.mozilla.org/show_bug.cgi?id=1693513#c34:

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 https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/38

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 stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/57fae052b308
[Wayland] Set the OcclusionStateChanged() when inactive r=emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years 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.

Attachment

General

Created:
Updated:
Size: