Closed Bug 1153694 Opened 6 years ago Closed 5 years ago
background-attachment:fixed on scrolled elements causes too much layerization
This is a regression from bug 1148855. It can be seen on http://fantasai.inkedblade.net/weblog/ , where the h1 and address elements at the top have a fixed background image. It causes the whole text content of the page to be lifted into a new layer above the one that contains the white background + blue border. We should detect that the fixed background has a clip with respect to the scrolled content, and not block layer merging for things outside that clip.
Markus, did anything ever happen with this? I encounter this quite a lot when investigating android OOMs. Though not specifically with background-attachment:fixed, just with anything with a different AGR. We often end up doubling our texture usage for the sake of a tiny bit of moving text. I must admit I'm not really sure how, why, or how often these things are clipped. I fear rarely. But especially in circumstances where there is no clip, we might want to think twice about creating a new layer for an unclipped AGR. The problem is of course it's hard to know half way through a display list what is the right call.
This particular bug hasn't been fixed yet - and it's specifically about background-attachment:fixed. We can talk about ways to reduce our memory usage on IRC tomorrow, if you want. The current code tries to layerize just as much as is required for correct APZ scrolling.
Review commit: https://reviewboard.mozilla.org/r/57394/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/57394/
Attachment #8759389 - Flags: review?(matt.woodrow)
Review commit: https://reviewboard.mozilla.org/r/57396/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/57396/
Comment on attachment 8759389 [details] Bug 1153694 - Don't let nsDisplayFixedPosition cause unnecessary layerization around itself. https://reviewboard.mozilla.org/r/57394/#review54198
Attachment #8759389 - Flags: review?(matt.woodrow) → review+
Comment on attachment 8759390 [details] Bug 1153694 - Test. https://reviewboard.mozilla.org/r/57396/#review54200
Attachment #8759390 - Flags: review+
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/0ed35b7de211 Don't let nsDisplayFixedPosition cause unnecessary layerization around itself. r=mattwoodrow
hey, this caused some tscrollx wins in talos on windows: https://treeherder.mozilla.org/perf.html#/alerts?id=1424
Cool! Not really sure why though. Either I introduced a bug or we were doing something really stupid before.
Assignee: nobody → mstange
Attachment #8759334 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.