| Summary: | Animation FPS drops if SVG changes from becomes visible from opacity 0 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Roland Soos <roland> | ||||||
| Component: | Animations | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | NEW --- | ||||||||
| Severity: | Normal | CC: | dino, graouts, graouts, sabouhallawa, simon.fraser, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | Safari 14 | ||||||||
| Hardware: | iPhone / iPad | ||||||||
| OS: | iOS 14 | ||||||||
| Attachments: |
|
||||||||
|
Description
Roland Soos
2021-05-27 03:08:38 PDT
It's possible that not opacity:0 itself cause this issue as we add visiblity:hidden to the elements which has opacity:0. So the cause could be that visibility:hidden changes to visibility:visible.
[data-force-hidden], [data-force-hidden] * {
visibility: hidden!important;
}
I can reproduce on iPhone 12 Pro; animates smoothly on a Mac. The SVG takes over 500ms to render on iPhone 7 Plus because of the filters (largely the gaussian blur). There's a layering change when opacity and/or transform transitions finish, which triggers a second paint of the SVG which is the visible stall. Some `will-change:` should fix this. Or you could remove the filters, since (in this example at least) they don't do anything visible. Thank you Simon, you are right. We dropped those filters and used filter="drop-shadow(...)" on the path and everything is the same. What is the tool what you used to find that it takes 500ms to render that SVG? Is it a tool in Safari(Mac) what I could use during remote debug of the real device? I used some internal instrumentation, but I think attaching with Web Inspector and collecting a timeline recording would show you some long paints. Created attachment 430045 [details]
Long paints in timeline
|