[wayland] Scrolling performance regression since changes to titlebar corners, especially when playing video in a second window
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr91 | --- | unaffected |
firefox95 | --- | unaffected |
firefox96 | --- | fixed |
firefox97 | --- | fixed |
People
(Reporter: ke5trel, Assigned: emilio)
References
(Blocks 2 open bugs, Regression)
Details
(Keywords: perf, regression)
Attachments
(1 file, 1 obsolete file)
(deleted),
text/x-phabricator-request
|
diannaS
:
approval-mozilla-beta+
|
Details |
STR:
- Start with
MOZ_ENABLE_WAYLAND=1
on Ubuntu 21.10. - Play a youtube video.
- Open second non-maximized window with a simple page (eg https://en.wikipedia.org).
- Scroll page with mousewheel.
Scrolling is choppy while video is playing. Reduced scrolling performance may also be noticed when a video is not playing but is less obvious. Switch to SW-WR if not reproducible with HW-WR.
Does not happen with ui.titlebarRadius = 0
, browser.tabs.inTitlebar = 0
, MOZ_ENABLE_WAYLAND=0
or maximized window (single monitor).
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=e3ed61b61357e78f89a316d68dd5cc69ffd099ac&tochange=eb8c23dda78d3ed4bf244c3e72c76e81833086ff
Regressed by Bug 1509931.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Is there any chance you could take a profile so that I know exactly what's going on on your machine? I can't see a terribly noticeable slowdown (but I haven't checked with SWWR yet).
Assignee | ||
Comment 2•3 years ago
|
||
But over all I'm fairly confused about how this could even be the case, it is my understanding that scrolling of the website and painting of the chrome area is relatively independent... So maybe it slowed down chrome painting a whole lot but that'd be somewhat surprising. I guess the body
border radius introduces a potential clip over the content area (but it should never really clip anything so I'd be surprised if WebRender got slower because of that).
Maybe some of the graphics folks can know off the top of their head how this rule:
/* On Wayland the compositor draws the titlebar border and shadow as well, so
* trim it by setting the radius on an ancestor of the toolbox-background */
@media (-moz-gtk-wayland) {
:root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) > body {
border-top-left-radius: env(-moz-gtk-csd-titlebar-radius);
border-top-right-radius: env(-moz-gtk-csd-titlebar-radius);
}
}
Can harm scrolling performance?
Assignee | ||
Comment 3•3 years ago
|
||
I restricted it somewhat intentionally, though perhaps we can get away
with removing the IsThemed() special-case altogether since border-radius
almost always removes native appearance on content.
Anyways, this should be safer, if a bit special-case-y.
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
Can you confirm that https://treeherder.mozilla.org/jobs?repo=try&revision=ac8324148db3c9d63a88ce6aa30fa6aaff53f387 fixes the issue for you?
Assignee | ||
Comment 5•3 years ago
|
||
For posterity, Glenn said:
I think I'd try and see if that change results in WR/compositor creating a heap more non-opque tiles which would result in more blending work for the compositor during scrolling?
The other thing it might do is mean that the background tiles don't get occluded by the front content tiles?
Lots of the logic for determining opaque / occluded tiles is fairly simple, and might fail in the case of unexpected clip masks, I suspect
If comment 4 does fix the issue for the reporter, I'll try to reduce something or investigate a bit more.
Updated•3 years ago
|
The comment 4 test build fixes it. Here's a profile without fix and a profile with fix, captured using SW-WR.
Assignee | ||
Comment 7•3 years ago
|
||
This is a better fix for the double decorations than clipping them using
CSS.
Updated•3 years ago
|
Comment 9•3 years ago
|
||
bugherder |
Comment 10•3 years ago
|
||
The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?
If not please set status_beta
to wontfix
.
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 11•3 years ago
|
||
Comment on attachment 9255477 [details]
Bug 1745894 - Don't draw window decorations when painting headerbar on wayland. r=stransky
Beta/Release Uplift Approval Request
- User impact if declined: Perf regression in some configurations.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Simple change to the regressing bug to avoid hitting a WebRender slow path.
- String changes made/needed: none
Comment 12•3 years ago
|
||
Comment on attachment 9255477 [details]
Bug 1745894 - Don't draw window decorations when painting headerbar on wayland. r=stransky
Approved for 96.0b8
Comment 13•3 years ago
|
||
bugherder uplift |
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Description
•