summaryrefslogtreecommitdiff
path: root/src/mbgl/layout/symbol_layout.hpp
diff options
context:
space:
mode:
authorMolly Lloyd <molly@mapbox.com>2018-08-29 17:27:40 -0700
committerMolly Lloyd <mollymerp@users.noreply.github.com>2018-08-31 13:08:47 -0700
commitd197fc7d8daf06cc2efc35a34fb45d86ea64d65b (patch)
tree365b09122531ef51b253417191368c14de171eb4 /src/mbgl/layout/symbol_layout.hpp
parentf7dcd5d7416f076c3553ccec9844fa77fe0e0ea5 (diff)
downloadqtlocation-mapboxgl-d197fc7d8daf06cc2efc35a34fb45d86ea64d65b.tar.gz
[core] simplify dependency layout process and refactor data structures
Diffstat (limited to 'src/mbgl/layout/symbol_layout.hpp')
-rw-r--r--src/mbgl/layout/symbol_layout.hpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mbgl/layout/symbol_layout.hpp b/src/mbgl/layout/symbol_layout.hpp
index 43b577859f..b866703e6c 100644
--- a/src/mbgl/layout/symbol_layout.hpp
+++ b/src/mbgl/layout/symbol_layout.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include <mbgl/layout/layout.hpp>
#include <mbgl/map/mode.hpp>
#include <mbgl/style/layers/symbol_layer_properties.hpp>
#include <mbgl/layout/symbol_feature.hpp>
@@ -25,20 +26,23 @@ namespace style {
class Filter;
} // namespace style
-class SymbolLayout {
+class SymbolLayout : public Layout {
public:
SymbolLayout(const BucketParameters&,
const std::vector<const RenderLayer*>&,
std::unique_ptr<GeometryTileLayer>,
ImageDependencies&,
GlyphDependencies&);
+
+ ~SymbolLayout() final = default;
- void prepare(const GlyphMap&, const GlyphPositions&,
- const ImageMap&, const ImagePositions&);
+ void prepareSymbols(const GlyphMap&, const GlyphPositions&,
+ const ImageMap&, const ImagePositions&) override;
- std::unique_ptr<SymbolBucket> place(const bool showCollisionBoxes);
+ void createBucket(const ImagePositions&, std::unique_ptr<FeatureIndex>&, std::unordered_map<std::string, std::shared_ptr<Bucket>>&, const bool firstLoad, const bool showCollisionBoxes) override;
- bool hasSymbolInstances() const;
+ bool hasSymbolInstances() const override;
+ bool hasDependencies() const override;
std::map<std::string,
std::pair<style::IconPaintProperties::PossiblyEvaluated, style::TextPaintProperties::PossiblyEvaluated>> layerPaintProperties;
@@ -81,7 +85,7 @@ private:
bool sdfIcons = false;
bool iconsNeedLinear = false;
-
+
style::TextSize::UnevaluatedType textSize;
style::IconSize::UnevaluatedType iconSize;