mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Migrate deprecated frameInterval to preferredFramesPerSecond (#28675)
Summary: [frameInterval](https://developer.apple.com/documentation/quartzcore/cadisplaylink/1621231-frameinterval) was deprecated in favor of [preferredFramesPerSecond](https://developer.apple.com/documentation/quartzcore/cadisplaylink/1648421-preferredframespersecond). This migrates the deprecated call over. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [iOS] [Fixed] - Migrate frameInterval to preferredFramesPerSecond Pull Request resolved: https://github.com/facebook/react-native/pull/28675 Test Plan: Xcode should no longer throw warnings about the deprecated call. Differential Revision: D21109710 Pulled By: shergin fbshipit-source-id: 772b9f625d3e22cd4d8cd60bddad57ff8611af54
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7a2c685ac1
commit
335f3aabe2
@@ -183,7 +183,7 @@ static NSUInteger RCTDeviceFreeMemory() {
|
||||
// TODO: `displayLink.frameInterval` is not available on UIKitForMac
|
||||
NSTimeInterval duration = displayLink.duration;
|
||||
#else
|
||||
NSTimeInterval duration = displayLink.duration * displayLink.frameInterval;
|
||||
NSTimeInterval duration = displayLink.duration * displayLink.preferredFramesPerSecond;
|
||||
#endif
|
||||
NSUInteger totalFrameCount = self.totalFrameCount;
|
||||
NSUInteger currentFrameIndex = self.currentFrameIndex;
|
||||
|
||||
Reference in New Issue
Block a user