diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/darwin/src/MGLOpenGLStyleLayer.mm | 9 | ||||
-rw-r--r-- | platform/macos/macos.xcodeproj/project.pbxproj | 8 | ||||
-rw-r--r-- | platform/macos/src/MGLMapView.mm | 8 |
3 files changed, 6 insertions, 19 deletions
diff --git a/platform/darwin/src/MGLOpenGLStyleLayer.mm b/platform/darwin/src/MGLOpenGLStyleLayer.mm index 2641369fd1..7b0200c56f 100644 --- a/platform/darwin/src/MGLOpenGLStyleLayer.mm +++ b/platform/darwin/src/MGLOpenGLStyleLayer.mm @@ -193,7 +193,9 @@ public: // We need to ensure that this layer is retained, so that any references from layer impl's // e.g. contexts) are still valid -// [style addToManagedLayers:self]; + +// [style addToManagedLayers:self]; // This is currently handled by the Custom layer, when the style +// sets itself to be the layer's observer [super addToStyle:style belowLayer:otherLayer]; } @@ -201,8 +203,9 @@ public: - (void)removeFromStyle:(MGLStyle *)style { [super removeFromStyle:style]; - // We need to ensure that this layer is now released (however, if this layer is about to be - // used by the renderer then it will released once rendering is complete) + // We need to ensure that this layer is now released (not necessarily freed) + // This is currently handled by the Custom layer, when the style + // unsets itself as the layer's observer // [style removeFromManagedLayers:self]; self.style = nil; diff --git a/platform/macos/macos.xcodeproj/project.pbxproj b/platform/macos/macos.xcodeproj/project.pbxproj index 903b34e7dd..4327670911 100644 --- a/platform/macos/macos.xcodeproj/project.pbxproj +++ b/platform/macos/macos.xcodeproj/project.pbxproj @@ -97,8 +97,6 @@ 9654C12B1FFC38E000DB6A19 /* MGLPolyline_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 9654C12A1FFC38E000DB6A19 /* MGLPolyline_Private.h */; }; 9654C12D1FFC394700DB6A19 /* MGLPolygon_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 9654C12C1FFC394700DB6A19 /* MGLPolygon_Private.h */; }; 96E027311E57C9A7004B8E66 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 96E027331E57C9A7004B8E66 /* Localizable.strings */; }; - CA67C814204DCC0300C1CBB4 /* MGLStyleLayerRetentionManager_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = CA67C805204DCBE800C1CBB4 /* MGLStyleLayerRetentionManager_Private.h */; }; - CA67C815204DCC0D00C1CBB4 /* MGLStyleLayerRetentionManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = CA67C807204DCBE900C1CBB4 /* MGLStyleLayerRetentionManager.mm */; }; DA00FC8A1D5EEAC3009AABC8 /* MGLAttributionInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = DA00FC881D5EEAC3009AABC8 /* MGLAttributionInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; DA00FC8B1D5EEAC3009AABC8 /* MGLAttributionInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA00FC891D5EEAC3009AABC8 /* MGLAttributionInfo.mm */; }; DA0CD58E1CF56F5800A5F5A5 /* MGLFeatureTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = DA0CD58D1CF56F5800A5F5A5 /* MGLFeatureTests.mm */; }; @@ -400,8 +398,6 @@ 96E027391E57C9B9004B8E66 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = "<group>"; }; 96E0273A1E57C9BB004B8E66 /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = vi.lproj/Localizable.strings; sourceTree = "<group>"; }; 96E0273B1E57C9BC004B8E66 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/Localizable.strings"; sourceTree = "<group>"; }; - CA67C805204DCBE800C1CBB4 /* MGLStyleLayerRetentionManager_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLStyleLayerRetentionManager_Private.h; sourceTree = "<group>"; }; - CA67C807204DCBE900C1CBB4 /* MGLStyleLayerRetentionManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLStyleLayerRetentionManager.mm; sourceTree = "<group>"; }; DA00FC881D5EEAC3009AABC8 /* MGLAttributionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLAttributionInfo.h; sourceTree = "<group>"; }; DA00FC891D5EEAC3009AABC8 /* MGLAttributionInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLAttributionInfo.mm; sourceTree = "<group>"; }; DA0CD58D1CF56F5800A5F5A5 /* MGLFeatureTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLFeatureTests.mm; path = ../../darwin/test/MGLFeatureTests.mm; sourceTree = "<group>"; }; @@ -1134,8 +1130,6 @@ 92F2C3EA1F0E3A1900268EC0 /* MGLRendererFrontend.h */, DAE6C3571CC31E0400DB3429 /* MGLStyle.h */, 3537CA731D3F93A600380318 /* MGLStyle_Private.h */, - CA67C805204DCBE800C1CBB4 /* MGLStyleLayerRetentionManager_Private.h */, - CA67C807204DCBE900C1CBB4 /* MGLStyleLayerRetentionManager.mm */, DAE6C37A1CC31E2A00DB3429 /* MGLStyle.mm */, DAE6C3591CC31E0400DB3429 /* MGLTypes.h */, DAE6C37C1CC31E2A00DB3429 /* MGLTypes.m */, @@ -1213,7 +1207,6 @@ DAE6C3971CC31E2A00DB3429 /* NSBundle+MGLAdditions.h in Headers */, DAED385F1D62CED700D7640F /* NSURL+MGLAdditions.h in Headers */, DAD165741CF4CD7A001FF4B9 /* MGLShapeCollection.h in Headers */, - CA67C814204DCC0300C1CBB4 /* MGLStyleLayerRetentionManager_Private.h in Headers */, DAE6C3631CC31E0400DB3429 /* MGLPointAnnotation.h in Headers */, DAC2ABC51CC6D343006D18C4 /* MGLAnnotationImage_Private.h in Headers */, DAE6C35F1CC31E0400DB3429 /* MGLOfflinePack.h in Headers */, @@ -1550,7 +1543,6 @@ DAE6C3911CC31E2A00DB3429 /* MGLPolygon.mm in Sources */, 35C6DF851E214C0400ACA483 /* MGLDistanceFormatter.m in Sources */, DAE6C39B1CC31E2A00DB3429 /* NSProcessInfo+MGLAdditions.m in Sources */, - CA67C815204DCC0D00C1CBB4 /* MGLStyleLayerRetentionManager.mm in Sources */, DAA998FC1E9F545C002E6EA6 /* MGLFillExtrusionStyleLayer.mm in Sources */, DAE6C38F1CC31E2A00DB3429 /* MGLOfflineStorage.mm in Sources */, DAED38601D62CED700D7640F /* NSURL+MGLAdditions.m in Sources */, diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 8b9a5a982f..4cbf2b9fba 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -15,7 +15,6 @@ #import "MGLMultiPoint_Private.h" #import "MGLOfflineStorage_Private.h" #import "MGLStyle_Private.h" -#import "MGLStyleLayerRetentionManager_Private.h" #import "MGLShape_Private.h" #import "MGLAccountManager.h" @@ -145,7 +144,6 @@ public: @property (nonatomic, readwrite) NSView *attributionView; @property (nonatomic, readwrite) MGLStyle *style; -@property (nonatomic) MGLStyleLayerRetentionManager* styleLayerRetentionManager; /// Mapping from reusable identifiers to annotation images. @property (nonatomic) NS_MUTABLE_DICTIONARY_OF(NSString *, MGLAnnotationImage *) *annotationImagesByIdentifier; @@ -258,8 +256,6 @@ public: - (void)commonInit { _isTargetingInterfaceBuilder = NSProcessInfo.processInfo.mgl_isInterfaceBuilderDesignablesAgent; - _styleLayerRetentionManager = [[MGLStyleLayerRetentionManager alloc] init]; - // Set up cross-platform controllers and resources. _mbglView = new MGLMapViewImpl(self); @@ -886,8 +882,6 @@ public: return; } - [self.styleLayerRetentionManager updateRetainedLayers:self.style.managedLayers]; - if ([self.delegate respondsToSelector:@selector(mapViewWillStartRenderingFrame:)]) { [self.delegate mapViewWillStartRenderingFrame:self]; } @@ -903,8 +897,6 @@ public: [self.style didChangeValueForKey:@"layers"]; } - [self.styleLayerRetentionManager decrementLifetimes]; - if ([self.delegate respondsToSelector:@selector(mapViewDidFinishRenderingFrame:fullyRendered:)]) { [self.delegate mapViewDidFinishRenderingFrame:self fullyRendered:fullyRendered]; } |