summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/buckets/symbol_bucket.hpp
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-03-11 10:26:19 +0200
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-03-13 17:14:53 +0200
commit8be135231d9efe41a3b12037518d02b36104e8cf (patch)
treeefecd5380232f899aed2cd5824dc16f057f0469a /src/mbgl/renderer/buckets/symbol_bucket.hpp
parent8a51362bccbd6487dd1ed8518443b16ba6114fd8 (diff)
downloadqtlocation-mapboxgl-8be135231d9efe41a3b12037518d02b36104e8cf.tar.gz
[core] Add possibility of overriding paint properties inside format expression #14062
* [core] Add format override expression and formatted section to evaluation context * [core] Add textColor to TaggedString's formatted section * [core] Add FormatSectionOverrides and introduce overridable properties * [core] Populate symbol layer paint properties for text sections * [core] Add benchmark for style that uses text-color override * [core] Add unit test for FormatOverrideExpression * [core] Add unit test for FormatSectionOverrides
Diffstat (limited to 'src/mbgl/renderer/buckets/symbol_bucket.hpp')
-rw-r--r--src/mbgl/renderer/buckets/symbol_bucket.hpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/mbgl/renderer/buckets/symbol_bucket.hpp b/src/mbgl/renderer/buckets/symbol_bucket.hpp
index 709e48dd2e..9764d870da 100644
--- a/src/mbgl/renderer/buckets/symbol_bucket.hpp
+++ b/src/mbgl/renderer/buckets/symbol_bucket.hpp
@@ -58,6 +58,10 @@ public:
bool hasIconData() const;
bool hasCollisionBoxData() const;
bool hasCollisionCircleData() const;
+ bool hasFormatSectionOverrides();
+ void updatePaintProperties(const std::string& layerID,
+ style::SymbolPaintProperties::PossiblyEvaluated);
+ void setPaintPropertyOverrides(style::SymbolPaintProperties::PossiblyEvaluated&);
void updateOpacity();
void sortFeatures(const float angle);
@@ -87,7 +91,7 @@ public:
std::unique_ptr<SymbolSizeBinder> textSizeBinder;
- struct TextBuffer {
+ struct Buffer {
gfx::VertexVector<SymbolLayoutVertex> vertices;
gfx::VertexVector<gfx::Vertex<SymbolDynamicLayoutAttributes>> dynamicVertices;
gfx::VertexVector<gfx::Vertex<SymbolOpacityAttributes>> opacityVertices;
@@ -103,19 +107,8 @@ public:
std::unique_ptr<SymbolSizeBinder> iconSizeBinder;
- struct IconBuffer {
- gfx::VertexVector<SymbolLayoutVertex> vertices;
- gfx::VertexVector<gfx::Vertex<SymbolDynamicLayoutAttributes>> dynamicVertices;
- gfx::VertexVector<gfx::Vertex<SymbolOpacityAttributes>> opacityVertices;
- gfx::IndexVector<gfx::Triangles> triangles;
- SegmentVector<SymbolIconAttributes> segments;
- std::vector<PlacedSymbol> placedSymbols;
+ struct IconBuffer : public Buffer {
PremultipliedImage atlasImage;
-
- optional<gfx::VertexBuffer<SymbolLayoutVertex>> vertexBuffer;
- optional<gfx::VertexBuffer<gfx::Vertex<SymbolDynamicLayoutAttributes>>> dynamicVertexBuffer;
- optional<gfx::VertexBuffer<gfx::Vertex<SymbolOpacityAttributes>>> opacityVertexBuffer;
- optional<gfx::IndexBuffer> indexBuffer;
} icon;
struct CollisionBuffer {
@@ -139,6 +132,7 @@ public:
uint32_t bucketInstanceId = 0;
bool justReloaded = false;
+ optional<bool> hasFormatSectionOverrides_;
std::shared_ptr<std::vector<size_t>> featureSortOrder;
};