From eef723a553b00794ec8eae7b5d08ff65331d2fa5 Mon Sep 17 00:00:00 2001 From: Michal Zelinka Date: Sun, 29 Aug 2021 01:35:04 +0200 Subject: [PATCH] [wip] Disabled snapshotting due to background crashing --- platform/ios/platform/ios/src/MGLMapView.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/ios/platform/ios/src/MGLMapView.mm b/platform/ios/platform/ios/src/MGLMapView.mm index 2a5711a1d64..642bd392561 100644 --- a/platform/ios/platform/ios/src/MGLMapView.mm +++ b/platform/ios/platform/ios/src/MGLMapView.mm @@ -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 @@ -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; } }