diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-06-20 15:19:12 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-06-21 17:18:08 -0700 |
commit | 244484ca6c64b6024a59786a194ea8ba19fae809 (patch) | |
tree | e7f8ed853543bf885b95145fea2c42d6591589d5 /src/mbgl/layout/symbol_layout.hpp | |
parent | 7b90af5d3580bd57cd4280173c1d2b0ee542b89d (diff) | |
download | qtlocation-mapboxgl-244484ca6c64b6024a59786a194ea8ba19fae809.tar.gz |
[core] retain GeometryTileLayer in SymbolLayout
We're storing GeometryTileFeature objects in SymbolLayout, but they may reference data in GeometryTileLayer, which could go away if we don't retain it.
Diffstat (limited to 'src/mbgl/layout/symbol_layout.hpp')
-rw-r--r-- | src/mbgl/layout/symbol_layout.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mbgl/layout/symbol_layout.hpp b/src/mbgl/layout/symbol_layout.hpp index b22c47c567..8cdaadff00 100644 --- a/src/mbgl/layout/symbol_layout.hpp +++ b/src/mbgl/layout/symbol_layout.hpp @@ -29,7 +29,7 @@ class SymbolLayout { public: SymbolLayout(const BucketParameters&, const std::vector<const RenderLayer*>&, - const GeometryTileLayer&, + std::unique_ptr<GeometryTileLayer>, ImageDependencies&, GlyphDependencies&); @@ -74,7 +74,9 @@ private: const float placementAngle, WritingModeType writingModes); - const std::string sourceLayerName; + // Stores the layer so that we can hold on to GeometryTileFeature instances in SymbolFeature, + // which may reference data from this object. + const std::unique_ptr<GeometryTileLayer> sourceLayer; const std::string bucketName; const float overscaling; const float zoom; |