Bug 202269 - [iOS 13] requestAnimationFrame runs at 90Hz in low power mode
Summary: [iOS 13] requestAnimationFrame runs at 90Hz in low power mode
Status: RESOLVED DUPLICATE of bug 204713
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: Other
Hardware: iPhone / iPad Other
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-26 08:22 PDT by Ashley Gullen
Modified: 2020-08-22 16:00 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ashley Gullen 2019-09-26 08:22:15 PDT
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.
Comment 1 Ashley Gullen 2019-09-26 08:22:52 PDT
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!
Comment 2 Radar WebKit Bug Importer 2019-09-26 08:50:55 PDT
<rdar://problem/55745055>
Comment 3 Said Abou-Hallawa 2020-01-24 13:37:08 PST

*** This bug has been marked as a duplicate of bug 204713 ***