Text animation is choppy with webrender enabled because of texture cache polution
Categories
(Core :: Graphics: WebRender, defect, P3)
Tracking
()
People
(Reporter: tbabos, Assigned: lsalzman)
References
Details
(Keywords: perf)
Attachments
(2 files)
(deleted),
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details |
(deleted),
text/html
|
Details |
Affected versions
Nightly 69.0a1 (2019-06-20)
Affected platforms
Windows 10 - Intel graphics card - Webrender ON
Steps to reproduce
- Launch Firefox
- Go to https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts/
- Scroll down to the "A single font" animated text
Expected result
The text animation should be smooth as on Firefox with webrender disabled
Actual Result
Text animation is choppy, not as smooth with webrender enabled, check the recording: https://streamable.com/ig5oh
Comment 2•5 years ago
|
||
It looks like this might be a texture upload problem. The profile is a bit difficult to interpret.
Timea, do you only see this problem on Intel?
Reporter | ||
Comment 3•5 years ago
|
||
Yes, this is reproducible on Intel graphics cards:
- Intel(R) HD Graphics 4600
- Intel(R) UHD Graphics 620
Will check it on AMD and NVIDIA cards too.
Reporter | ||
Comment 4•5 years ago
|
||
Also reproducible on:
- AMD RX 550
- Nvidia Ge Force GT 730 - the animation is not loaded at all
Not reproducible on:
- Nvidia GeForce GT 1030
Comment 5•5 years ago
|
||
This issue is also reproducible on Firefox 68.0b13 (20190624133534) with AMD R7 360 and AMD Rx 550
Comment 6•5 years ago
|
||
(In reply to Timea Babos from comment #4)
Also reproducible on:
- AMD RX 550
- Nvidia Ge Force GT 730 - the animation is not loaded at all
Can you file a separate bug for the animation not loading on the GT 730?
Reporter | ||
Comment 7•5 years ago
|
||
Yes, my colleague with that NVIDIA card submitted Bug 1561914.
Comment 8•5 years ago
|
||
This is also choppy on MBP with external 4K monitor. The profile shows that composites are taking between 30-40ms: https://perfht.ml/2IRTSrm.
Updated•5 years ago
|
![]() |
||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 10•5 years ago
|
||
The example shows an animated variation font, which means we have no choice but to re-rasterize the font every time the variation values change, since it is essentially a different ScaledFont we're working with every frame, same as Gecko would see. The glyphs in question are also extremely big, both of which are working against this.
Dzmitry, is there anything obvious we could do to make the upload suck less here?
Comment 11•5 years ago
|
||
Turning on the texture cache debugging makes what I think is the problem more obvious. We're basically just blowing up the texture cache a whole bunch.
Updated•5 years ago
|
Comment 12•5 years ago
|
||
For bulk upload speed on Windows, I don't think there are any immediate plans to make it better. For upload on macs, swizzling would help - bug 1548339
For Jeff's observation (if it's not about swizzling at all) - sounds like we should tweak the eviction policy for re-rasterized glyphs.
Assignee | ||
Comment 13•5 years ago
|
||
Updated•5 years ago
|
Comment 14•5 years ago
|
||
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ca1ff794e472 limit the size of WebRender's glyph cache. r=kvark
Comment 15•5 years ago
|
||
Backed out changeset ca1ff794e472 (bug 1560520) for build bustage and wrench
Backout: https://hg.mozilla.org/integration/autoland/rev/6b0dafb0fb9d408a6367ecf2c44799a9464e77ba
Failure push; https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=ca1ff794e472f28f0f65cd93af158957c112dc62
Failure logs:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=256975344&repo=autoland&lineNumber=1079
https://treeherder.mozilla.org/logviewer.html#?job_id=256975280&repo=autoland
Assignee | ||
Updated•5 years ago
|
Comment 16•5 years ago
|
||
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b2f7f31d6781 limit the size of WebRender's glyph cache. r=kvark
![]() |
||
Comment 17•5 years ago
|
||
Backed out for wrench bustage: https://hg.mozilla.org/integration/autoland/rev/b2f7f31d6781e963027db2a9443ada00143f0774
Assignee | ||
Updated•5 years ago
|
Comment 18•5 years ago
|
||
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7596163c881a limit the size of WebRender's glyph cache. r=kvark
Comment 19•5 years ago
|
||
Backout by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/66e163051112 Backed out changeset b2f7f31d6781 for wrench bustage. CLOSED TREE
Comment 20•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Comment 21•5 years ago
|
||
Is this something we should consider uplifting to Beta for Fx69?
Assignee | ||
Comment 22•5 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM] from comment #21)
Is this something we should consider uplifting to Beta for Fx69?
Yes. Just want to let it simmer on nightly a couple of days before we uplift.
Assignee | ||
Comment 23•5 years ago
|
||
Comment on attachment 9077928 [details]
Bug 1560520 - limit the size of WebRender's glyph cache. r?kvark
Beta/Release Uplift Approval Request
- User impact if declined: Jank when using pages with animated text or lots of different fonts.
- 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): Lowers memory usage of WR glyph cache to be more in line with the non-WR path, but should not otherwise change semantics of how text is rendered.
- String changes made/needed:
Reporter | ||
Comment 24•5 years ago
|
||
Verified - fixed on latest Nightly 70.0a1 (2019-07-22) (64-bit) on Windows 10 with the following cards:
- AMD RX550
- Intel Intel(R) HD Graphics 4600
- GeForce GT 730
Waiting for uplift to Beta.
Comment 25•5 years ago
|
||
Comment on attachment 9077928 [details]
Bug 1560520 - limit the size of WebRender's glyph cache. r?kvark
Fixes a WR memory usage regression which can cause jank when using pages with animated text or lots of different fonts. Verified by QA on Nightly. Approved for 69.0b8.
Comment 26•5 years ago
|
||
bugherder uplift |
Reporter | ||
Comment 27•5 years ago
|
||
Verified - fixed on latest Beta 69.0b8 (64-bit) on Windows 10 with the following cards:
AMD RX550
Intel Intel(R) HD Graphics 4600
GeForce GT 730
Reporter | ||
Comment 28•5 years ago
|
||
Hey Jeff,
We could reproduce this issue again on latest Nightly, Beta and Release on Windows with Intel, AMD and Nvidia cards. (force enbled webrender)
Now it affects all the font animations, here is a reduced testcase where it is clearly visible: https://codepen.io/MSEdgeDev/pen/mxeOGW
Disabling WebRender will solve the issue.
Should we submit a new issue or re-open this one?
Comment 29•5 years ago
|
||
Please open a new bug and ideally find a regression window for when things got worse again.
Assignee | ||
Updated•4 years ago
|
Comment 31•4 years ago
|
||
The original URL is gone, but luckily the demos were open sourced on github, so there's a copy at https://github.com/MicrosoftEdge/Demos/blob/master/variable-fonts/index.html . It's missing the fonts though, so I had to find the decovar font separately and put it in the right place.
In this testcase I've set the font size to 159px, because otherwise we hit the 320 limit on @2x HiDPI and rasterize the font as blobs rather than glyphs.
Description
•