Skip to content

Commit

Permalink
[wip] Disabled snapshotting due to background crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
username0x0a committed Sep 22, 2022
1 parent 2ea3359 commit 3871094
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions platform/ios/platform/ios/src/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1651,6 +1651,8 @@ - (void)willResignActive:(NSNotification *)notification
// We want to pause the rendering
[self stopDisplayLink];

// self.lastSnapshotImage = _mbglView->snapshot();

// For OpenGL this calls glFinish as recommended in
// https://developer.apple.com/library/archive/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/ImplementingaMultitasking-awareOpenGLESApplication/ImplementingaMultitasking-awareOpenGLESApplication.html#//apple_ref/doc/uid/TP40008793-CH5-SW1
// reduceMemoryUse(), calls performCleanup(), which calls glFinish
Expand Down Expand Up @@ -7185,8 +7187,8 @@ - (void)attemptBackgroundSnapshot {
NSTimeInterval now = CACurrentMediaTime();

if (lastSnapshotTime == 0.0 || (now - lastSnapshotTime > MGLBackgroundSnapshotImageInterval)) {
MGLLogDebug(@"Taking snapshot");
self.lastSnapshotImage = _mbglView->snapshot();
// MGLLogDebug(@"Taking snapshot");
// self.lastSnapshotImage = _mbglView->snapshot();
lastSnapshotTime = now;
}
}
Expand Down

0 comments on commit 3871094

Please sign in to comment.