| Summary: | Throttling requestAnimation Frame to 30 FPS in low power mode on iOS 14 (but not iOS 13) | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Sirong Chen <sirong.chen> |
| Component: | Frames | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Major | CC: | ap, jonlee, sabouhallawa, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | iPhone / iPad | ||
| OS: | Other | ||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=202269 https://bugs.webkit.org/show_bug.cgi?id=206680 https://bugs.webkit.org/show_bug.cgi?id=204713 |
||
|
Description
Sirong Chen
2020-08-21 16:59:10 PDT
This is intentional. In fact the behavior in iOS 13 was a bug. Her is the history of the low power mode throttling: 1. In r213169, rAF was throttled to 30fps when low power mode is on. 2. In r244182, Page::updateRendering() step was introduced but this broke the low power mode throttling. It actually made it worse by having rAF runs at 90fps with Lowe power mode. This was happening because ScriptedAnimationController had a throttling timer which runs at 30fps and Page::updateRendering() uses DisplayRefreshMonitor which runs at 60fps. Running them both at the same time causes the 90fps bug. 3. In r261113, the low power mode throttling was fixed by removing ScriptedAnimationController throttling timer and having the DisplayRefreshMonitor of the Page::updateRendering() runs as 30fps. Webkit and other browsers strive hard to achieve 60fps for rAF but it is not guaranteed. If the animation is really complex such that the frame is drawn in more than 16ms, rAF will be running lower than 60fps. A similar situation is when the device is busy, warm, or low in memory. Low power mode is an exceptional state of the device also in which WebKit is required to save power as much it can with expensive operations like animation. Running rAF with 30fps is a little bit rough but it is okay. |