[wayland] Set the OcclusionStateChanged() when inactive
Categories
(Core :: Widget: Gtk, enhancement, P3)
Tracking
()
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:
- 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. - 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
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Comment 1•2 years ago
|
||
A proper protocol is almost ready now: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/99
Assignee | ||
Comment 2•1 year ago
|
||
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 | ||
Updated•1 year ago
|
Reporter | ||
Comment 3•1 year ago
|
||
Sure, please go ahead! I would have myself if I had more time :(
Assignee | ||
Comment 4•1 year ago
|
||
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.
Assignee | ||
Comment 5•1 year ago
|
||
https://phabricator.services.mozilla.com/D125061 may be used as a template.
Assignee | ||
Comment 6•11 months ago
|
||
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/57fae052b308 [Wayland] Set the OcclusionStateChanged() when inactive r=emilio
Comment 8•11 months ago
|
||
bugherder |
Description
•