diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/MGLMapView.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index bd751a333d..e805f84f08 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -53,7 +53,7 @@ const CGFloat MGLMinimumPitch = 0; const CGFloat MGLMaximumPitch = 60; const CLLocationDegrees MGLAngularFieldOfView = M_PI / 6.; const std::string spritePrefix = "com.mapbox.sprites."; -const NSUInteger MGLTargetFPS = 30; +const NSUInteger MGLTargetFrameInterval = 2; //Target FPS will be 60 divided by this value NSString *const MGLAnnotationIDKey = @"MGLAnnotationIDKey"; NSString *const MGLAnnotationSymbolKey = @"MGLAnnotationSymbolKey"; @@ -232,7 +232,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) // setup refresh driver _displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(updateFromDisplayLink)]; - _displayLink.frameInterval = 60 / MGLTargetFPS; + _displayLink.frameInterval = MGLTargetFrameInterval; [_displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; _needsDisplayRefresh = YES; |