diff options
author | Justin R. Miller <incanus@codesorcery.net> | 2015-11-04 09:57:33 -0800 |
---|---|---|
committer | Justin R. Miller <incanus@codesorcery.net> | 2015-11-04 10:33:30 -0800 |
commit | 3bab2ad7d601d0e414ccfdb1ea23ec2f3f536581 (patch) | |
tree | 53ff1064dab74659df884bcb799479567b2eaacd /platform/ios/MGLMapView.mm | |
parent | af758abf0fb45b93326ce274fa60e14d9973de38 (diff) | |
download | qtlocation-mapboxgl-3bab2ad7d601d0e414ccfdb1ea23ec2f3f536581.tar.gz |
more clearly indicate target FPS as relates to display link
Diffstat (limited to 'platform/ios/MGLMapView.mm')
-rw-r--r-- | platform/ios/MGLMapView.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index 7c5b6aa409..bd751a333d 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -53,6 +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; NSString *const MGLAnnotationIDKey = @"MGLAnnotationIDKey"; NSString *const MGLAnnotationSymbolKey = @"MGLAnnotationSymbolKey"; @@ -231,7 +232,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) // setup refresh driver _displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(updateFromDisplayLink)]; - _displayLink.frameInterval = 2; + _displayLink.frameInterval = 60 / MGLTargetFPS; [_displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; _needsDisplayRefresh = YES; |