mix-blend-mode forces an intermediate texture even when it has no effect
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
People
(Reporter: bradwerth, Assigned: bradwerth)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 7 obsolete files)
361 bytes,
text/html
|
Details |
WR attempts to determine when mix-blend-mode has no effect and optimize the work away. However, in push_stacking_context
we let Gecko request that the blend use an intermediate texture.
Since push_stacking_context
comes first, there are at least two possible approaches:
- Make
push_stacking_context
do some of the analysis done by WR and avoid specifying the stacking context as isolated. - Make WR fixup the earlier assumption about the stacking context when it determines that the mix-blend-mode will have no effect.
Assignee | ||
Comment 1•3 years ago
|
||
...and I've confirmed that both call sites noted in comment 1 are hit on the www.pixellot.tv site, which was the in-the-wild sighting for this issue.
Assignee | ||
Comment 2•3 years ago
•
|
||
(In reply to Brad Werth [:bradwerth] from comment #1)
...and I've confirmed that both call sites noted in comment 1 are hit on the www.pixellot.tv site, which was the in-the-wild sighting for this issue.
Yes, but: both call sites are hit, but for pixellot.tv the logic at the first site FlattenedStackingContext.is_redundant
concludes that the stacking context is not redundant, which makes this potential optimization not useful for that site.
This may still have some value for cases where mix-blend-mode is applied to the first primitive in a stacking context, where FlattenedStackingContext.is_redundant
returns true.
Assignee | ||
Comment 3•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
Assignee | ||
Comment 5•3 years ago
|
||
This helper function compartmentalizes the logic to transfer the work done by
one stacking context into another stacking context, or to a tile_cache_builder
if no destination stacking context is provided.
Updated•3 years ago
|
Assignee | ||
Comment 6•3 years ago
|
||
Assignee | ||
Comment 7•3 years ago
|
||
Depends on D103726
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 8•3 years ago
|
||
Depends on D103727
Assignee | ||
Comment 9•3 years ago
|
||
Depends on D104079
Assignee | ||
Comment 10•3 years ago
|
||
Depends on D103727
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 11•3 years ago
|
||
Assignee | ||
Comment 12•3 years ago
|
||
The testcase used here relies upon aberrant behavior noted in Bug 1599321. The optimization may still be useful, but once that Bug is fixed, the optimization will not be relevant for the testcase attachment 9197517 [details], which relies upon the body element having no specified color.
Comment 13•3 years ago
|
||
I haven't looked closely at this yet but I'm worried about the complexity that it brings. I'll take a closer look soon.
Assignee | ||
Comment 14•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 15•3 years ago
|
||
New try push with updated Part 4 (which moved its implementation from Gecko into WebRender): https://treeherder.mozilla.org/#/jobs?repo=try&revision=bb5c109a8dc400cc4f794aab9cb1ecb6eefc1015
Comment 16•3 years ago
|
||
How practical would it be to detect the lack of anything to blend with during Gecko display list building instead of during WebRender display list building? It seems easy for background-blend-mode, I'm not as sure about mix-blend-mode.
Assignee | ||
Comment 17•3 years ago
|
||
This optimization is complicated, and the cases where it matters are avoidable by removing the mix-blend-mode which has no effect. The first sighting of this bug was on pixellot.tv, and with other improvements to mix-blend-mode performance, that site now scrolls in software WR without too much jank.
The solution here would be more elegant if we had an intermediate representation that could alter the structure of the display list when processing in parent-child order, but without committing the parent before evaluating the child.
For now, I'll mark this bug as WONTFIX.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Description
•