summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Rex <julian.rex@mapbox.com>2019-03-21 00:20:04 -0400
committerJulian Rex <julian.rex@mapbox.com>2019-03-21 00:20:04 -0400
commit8db13f36230b275cb976bc6ad832fe5a22d2da38 (patch)
tree93150e0401a7f9afaf99e98c9a9b541f2c237965
parentf9f92093092e29139dd44cfaf272abc3c4ff19f6 (diff)
downloadqtlocation-mapboxgl-upstream/jrex/display-link-dance.tar.gz
-rw-r--r--platform/ios/app/File0
-rw-r--r--platform/ios/src/MGLMapView.mm4
2 files changed, 4 insertions, 0 deletions
diff --git a/platform/ios/app/File b/platform/ios/app/File
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/platform/ios/app/File
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 4a16d2f6fb..3baf2b416f 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -1432,6 +1432,10 @@ public:
}
NSLog(@"sleepGL - taking snapshot");
+
+ // $$JR - taking a snapshot calls `glkView:drawInRect:`, so the snapshot
+ // should NOT be called in the background. We should generate the snapshot
+ // when resigning active (rather than did enter background)
self.glSnapshotView.image = self.glView.snapshot;
self.glSnapshotView.hidden = NO;
NSLog(@"sleepGL - snapshot=%p", self.glSnapshotView.image);