diff options
Diffstat (limited to 'src/mbgl/layout/symbol_layout.hpp')
-rw-r--r-- | src/mbgl/layout/symbol_layout.hpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mbgl/layout/symbol_layout.hpp b/src/mbgl/layout/symbol_layout.hpp index 7d19aba671..8cdaadff00 100644 --- a/src/mbgl/layout/symbol_layout.hpp +++ b/src/mbgl/layout/symbol_layout.hpp @@ -29,11 +29,12 @@ class SymbolLayout { public: SymbolLayout(const BucketParameters&, const std::vector<const RenderLayer*>&, - const GeometryTileLayer&, - IconDependencies&, + std::unique_ptr<GeometryTileLayer>, + ImageDependencies&, GlyphDependencies&); - void prepare(const GlyphPositionMap& glyphs, const IconMap& icons); + void prepare(const GlyphMap&, const GlyphPositions&, + const ImageMap&, const ImagePositions&); std::unique_ptr<SymbolBucket> place(CollisionTile&); @@ -47,14 +48,14 @@ public: State state = Pending; std::map<std::string, - std::pair<style::IconPaintProperties::Evaluated, style::TextPaintProperties::Evaluated>> layerPaintProperties; + std::pair<style::IconPaintProperties::PossiblyEvaluated, style::TextPaintProperties::PossiblyEvaluated>> layerPaintProperties; private: void addFeature(const size_t, const SymbolFeature&, const std::pair<Shaping, Shaping>& shapedTextOrientations, optional<PositionedIcon> shapedIcon, - const GlyphPositions& face); + const GlyphPositionMap&); bool anchorIsTooClose(const std::u16string& text, const float repeatDistance, const Anchor&); std::map<std::u16string, std::vector<Anchor>> compareText; @@ -73,11 +74,14 @@ 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; const MapMode mode; + const float pixelRatio; style::SymbolLayoutProperties::PossiblyEvaluated layout; |