Optimize clip image mask rendering for axis-aligned masks
Categories
(Core :: Graphics: WebRender, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: gw, Assigned: gw)
References
Details
Attachments
(1 file)
47 bytes,
text/x-phabricator-request
|
jcristau
:
approval-mozilla-beta-
|
Details | Review |
Assignee | ||
Comment 1•4 years ago
|
||
There is some complexity in rendering clip masks that contain tiled
images, when the transform is complex (getting edge AA correct etc).
To work around this, the existing implementation simply draws the
entire primitive region with each image tile of the clip mask. This
works but is slow on large clip masks.
We can apply a simple optimization when the clip is axis-aligned,
which is the common case for the vast majority of pages. When this
case occurs, calculate a device space sub-rect for each of the
image mask tiles, and only draw to that part of the clip mask.
This can drastically reduce the amount of overdraw on pages that
have tiled clip masks that take up a large portion of the screen.
In the long term, WR should handle the case of complex transform
- tiled clip masks better too.
Updated•4 years ago
|
Pushed by gwatson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dc423cb83ba6 Optimize clip image mask rendering for axis-aligned masks. r=jrmuizel
Comment 3•4 years ago
|
||
Backed out for wr failures on clip-path-polygon-013.html
Backout link: https://hg.mozilla.org/integration/autoland/rev/598f3fb995df174de08d9a05098d142662a0a8a7
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=316885942&repo=autoland&lineNumber=13847
There were also reftest failures https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=316886373&repo=autoland&lineNumber=3135
Assignee | ||
Comment 4•4 years ago
|
||
I had noticed and fixed this failure before landing, but had forgotten to push the updated patch to phabricator, sorry!
Hopefully the updated patch should land OK.
Pushed by gwatson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2a8e77cf30b4 Optimize clip image mask rendering for axis-aligned masks. r=jrmuizel
Comment 6•4 years ago
|
||
bugherder |
Assignee | ||
Comment 7•4 years ago
|
||
Comment on attachment 9178135 [details]
Bug 1667707 - Optimize clip image mask rendering for axis-aligned masks.
Beta/Release Uplift Approval Request
- User impact if declined: Slower performance when using WR on a number of pages than necessary.
- Is this code covered by automated tests?: No
- 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): The patch is very simple and should only affect a small number of pages. It's easy to disable / revert if it causes any problems.
- String changes made/needed:
Assignee | ||
Comment 8•4 years ago
|
||
Please hold off on the beta merge request until I have time to investigate this reported regression in the morning. Jeff, do you want to back this out of nightly for now, until I investigate tomorrow?
Assignee | ||
Updated•4 years ago
|
Comment 9•4 years ago
|
||
Backed out changeset 2a8e77cf30b4 (bug 1667707) on Dev's request.
Backout:
https://hg.mozilla.org/integration/autoland/rev/8a3942c2bd5ea6675afbbb8b56f9f45a77dc3b57
Assignee | ||
Comment 10•4 years ago
|
||
Updated the patch with a fix for the regression in #1667936, pending try is https://treeherder.mozilla.org/#/jobs?repo=try&revision=72347f1f5aa26f9bba45c67f87d91be9842a2e55
Comment 11•4 years ago
|
||
Pushed by gwatson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9179a1a470a5 Optimize clip image mask rendering for axis-aligned masks. r=jrmuizel
Comment 12•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Assignee | ||
Comment 13•4 years ago
|
||
Comment on attachment 9178135 [details]
Bug 1667707 - Optimize clip image mask rendering for axis-aligned masks.
Beta/Release Uplift Approval Request
- User impact if declined: This is a very significant performance win on a range of pages (anything that uses a tiled clip mask + webrender) - on some pages it drops the GPU time to ~20% of what it was previously.
- 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): The patch has been in nightly for a around a week now, and doesn't seem to have caused any problems.
- String changes made/needed:
Comment 14•4 years ago
|
||
Comment on attachment 9178135 [details]
Bug 1667707 - Optimize clip image mask rendering for axis-aligned masks.
we're about to build the 82 release candidate, and this doesn't appear to fix a regression, so I'd rather let it ride to 83.
Description
•