diff options
author | Adam Hunter <adam@mapbox.com> | 2015-11-04 10:25:51 -0800 |
---|---|---|
committer | Justin R. Miller <incanus@codesorcery.net> | 2015-11-04 10:33:30 -0800 |
commit | b55bd858862177a530b2bff4bf9efe79c6eb146c (patch) | |
tree | 8c9eeaf184945aec53f9b883b9c1320e9dbbb043 /platform | |
parent | 3bab2ad7d601d0e414ccfdb1ea23ec2f3f536581 (diff) | |
download | qtlocation-mapboxgl-b55bd858862177a530b2bff4bf9efe79c6eb146c.tar.gz |
Indicate target frame interval, with a comment about how it relates to FPS.
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; |