-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[map] Expose presentsWithTransaction inside RenderOptions (#94)
* Expose presentsWithTransaction inside RenderOptions * add test * Call setNeedsDisplay instead of draw * Honor updates to preferredFramesPerSecond
- Loading branch information
1 parent
511e58d
commit 25a55fc
Showing
6 changed files
with
60 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import Foundation | ||
|
||
/// Used to configure rendering-specific capabilities of the `MapView` | ||
public struct RenderOptions: Equatable { | ||
|
||
/// The preferred frame rate at which the map view is rendered. | ||
/// | ||
/// The default value for this property is | ||
/// `.normal`, which will adaptively set the | ||
/// preferred frame rate based on the capability of the user’s device to maintain | ||
/// a smooth experience. | ||
/// | ||
/// See Also `CADisplayLink.preferredFramesPerSecond` | ||
public var preferredFramesPerSecond: PreferredFPS = .normal | ||
|
||
/// A Boolean value indicating whether the map should prefetch tiles. | ||
/// | ||
/// When this property is set to `true`, the map view prefetches tiles designed for | ||
/// a low zoom level and displays them until receiving more detailed tiles for the | ||
/// current zoom level. The prefetched tiles typically contain simplified versions | ||
/// of each shape, improving the map view’s perceived performance. | ||
/// | ||
/// The default value of this property is `true`. | ||
public var prefetchesTiles: Bool = true | ||
|
||
/// A Boolean value that indicates whether the underlying `CAMetalLayer` of the `MapView` | ||
/// presents its content using a CoreAnimation transaction | ||
/// | ||
/// By default, this is `false` resulting in the output of a rendering pass being displayed on | ||
/// the `CAMetalLayer` as quickly as possible (and asynchronously). This typically results | ||
/// in the fastest rendering performance. | ||
/// | ||
/// If, however, the `MapView` is overlaid with a `UIKit` element which must be pinned to a | ||
/// particular lat-long, then setting this to `true` will result in better synchronization and less jitter. | ||
public var presentsWithTransaction: Bool = false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters