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 authored and birkskyum committed Sep 23, 2022
1 parent 1fa8537 commit eef723a
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 @@ -1637,6 +1637,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 @@ -7171,8 +7173,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 eef723a

Please sign in to comment.