summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/symbol_layer_impl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/layers/symbol_layer_impl.hpp')
-rw-r--r--src/mbgl/style/layers/symbol_layer_impl.hpp66
1 files changed, 2 insertions, 64 deletions
diff --git a/src/mbgl/style/layers/symbol_layer_impl.hpp b/src/mbgl/style/layers/symbol_layer_impl.hpp
index 3d81ff1f69..28079fa731 100644
--- a/src/mbgl/style/layers/symbol_layer_impl.hpp
+++ b/src/mbgl/style/layers/symbol_layer_impl.hpp
@@ -1,7 +1,5 @@
#pragma once
-#include <mbgl/text/glyph.hpp>
-#include <mbgl/util/variant.hpp>
#include <mbgl/sprite/sprite_atlas.hpp>
#include <mbgl/style/layer_impl.hpp>
#include <mbgl/style/layers/symbol_layer.hpp>
@@ -9,53 +7,7 @@
namespace mbgl {
-class SymbolLayout;
-
namespace style {
-
-
-// {icon,text}-specific paint-property packs for use in the symbol Programs.
-// Since each program deals either with icons or text, using a smaller property set
-// lets us avoid unnecessarily binding attributes for properties the program wouldn't use.
-class IconPaintProperties : public PaintProperties<
- IconOpacity,
- IconColor,
- IconHaloColor,
- IconHaloWidth,
- IconHaloBlur,
- IconTranslate,
- IconTranslateAnchor
-> {};
-
-class TextPaintProperties : public PaintProperties<
- TextOpacity,
- TextColor,
- TextHaloColor,
- TextHaloWidth,
- TextHaloBlur,
- TextTranslate,
- TextTranslateAnchor
-> {};
-
-// Repackaging evaluated values from SymbolLayoutProperties + SymbolPaintProperties
-// for genericity over icons vs. text.
-class SymbolPropertyValues {
-public:
- // Layout
- AlignmentType pitchAlignment;
- AlignmentType rotationAlignment;
- PossiblyEvaluatedPropertyValue<float> layoutSize;
-
- // Paint
- std::array<float, 2> translate;
- TranslateAnchorType translateAnchor;
- float paintSize;
-
- float sdfScale; // Constant (1.0 or 24.0)
-
- bool hasHalo;
- bool hasFill;
-};
class SymbolLayer::Impl : public Layer::Impl {
public:
@@ -63,24 +15,10 @@ public:
std::unique_ptr<Layer> cloneRef(const std::string& id) const override;
void stringifyLayout(rapidjson::Writer<rapidjson::StringBuffer>&) const override;
- void cascade(const CascadeParameters&) override;
- bool evaluate(const PropertyEvaluationParameters&) override;
-
- std::unique_ptr<Bucket> createBucket(const BucketParameters&, const std::vector<const Layer*>&) const override;
- std::unique_ptr<SymbolLayout> createLayout(const BucketParameters&, const std::vector<const Layer*>&,
- const GeometryTileLayer&, GlyphDependencies&, IconDependencyMap&) const;
-
- IconPaintProperties::Evaluated iconPaintProperties() const;
- TextPaintProperties::Evaluated textPaintProperties() const;
-
- SymbolPropertyValues iconPropertyValues(const SymbolLayoutProperties::PossiblyEvaluated&) const;
- SymbolPropertyValues textPropertyValues(const SymbolLayoutProperties::PossiblyEvaluated&) const;
+ std::unique_ptr<RenderLayer> createRenderLayer() const override;
SymbolLayoutProperties layout;
- SymbolPaintProperties paint;
-
- float iconSize = 1.0f;
- float textSize = 16.0f;
+ SymbolPaintProperties::Cascading cascading;
SpriteAtlas* spriteAtlas = nullptr;
};