Bug 202269
Summary: | [iOS 13] requestAnimationFrame runs at 90Hz in low power mode | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ashley Gullen <ashley> |
Component: | Canvas | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | beidson, dino, jonlee, sabouhallawa, simon.fraser, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Other | ||
Hardware: | iPhone / iPad | ||
OS: | Other | ||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=204713 https://bugs.webkit.org/show_bug.cgi?id=215745 |
Ashley Gullen
On iOS 13 / 13.1, requestAnimationFrame runs at 90 Hz when low power mode is enabled.
Demo URL: https://www.scirra.com/labs/bugs/safari13raf/index.html
Steps to reproduce:
1. Ensure low power mode is disabled
2. Visit demo URL in Safari and observe FPS reading is 60 (tested on an iPhone 7 Plus, which has a display rate of 60 Hz)
3. Go to settings and enable low power mode
4. Switch back to Safari
Expected result:
FPS reading either the same or dropping to 30 (as I believe previous releases did)
Observed result:
FPS reading is now about 90 FPS, which is higher than the display rate of the device.
Originally discovered in this tweet: https://twitter.com/chribbe1/status/1176767527797579776
The issue appears to affect several web frameworks, indicating a general problem with requestAnimationFrame. I suspect a new 30 Hz timer is being set, but the old 60 Hz timer is not cancelled, resulting in adding together to make a 90 Hz callback frequency.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ashley Gullen
This also defeats the purpose of low battery mode, since running rAF at 90 Hz will consume more power than 60 Hz with the setting off!
Radar WebKit Bug Importer
<rdar://problem/55745055>
Said Abou-Hallawa
*** This bug has been marked as a duplicate of bug 204713 ***