summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/buckets/symbol_bucket.hpp
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-01-03 17:17:57 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-01-11 11:30:04 +0200
commit2bdab82dedf545b4272c534b067c68614d0355b7 (patch)
treeee437a1e8f26a25fe2e30d65db3d4e4e2985ae10 /src/mbgl/renderer/buckets/symbol_bucket.hpp
parent2da9d483ac8bce5bfa7523f9113e1bc4ef2cbfb5 (diff)
downloadqtlocation-mapboxgl-2bdab82dedf545b4272c534b067c68614d0355b7.tar.gz
[core] shader program must always match bucket in render symbol layer
Before this change, `RenderSymbolLayer` with updated style was trying to render symbols using the previous bucket (with paint property binders that matched a previous program). Now, symbol bucket caches the latest corresponding paint properties (caching is happening on complete tiles only). As a result, `RenderSymbolLayer` always picks the shader program and its parameters in sync with the obtained bucket.
Diffstat (limited to 'src/mbgl/renderer/buckets/symbol_bucket.hpp')
-rw-r--r--src/mbgl/renderer/buckets/symbol_bucket.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mbgl/renderer/buckets/symbol_bucket.hpp b/src/mbgl/renderer/buckets/symbol_bucket.hpp
index ccb2cce513..76fab2fa0f 100644
--- a/src/mbgl/renderer/buckets/symbol_bucket.hpp
+++ b/src/mbgl/renderer/buckets/symbol_bucket.hpp
@@ -40,7 +40,7 @@ public:
class SymbolBucket final : public Bucket {
public:
SymbolBucket(style::SymbolLayoutProperties::PossiblyEvaluated,
- const std::map<std::string, std::pair<style::IconPaintProperties::PossiblyEvaluated, style::TextPaintProperties::PossiblyEvaluated>>&,
+ std::map<std::string, style::SymbolPaintProperties::PossiblyEvaluated>,
const style::PropertyValue<float>& textSize,
const style::PropertyValue<float>& iconSize,
float zoom,
@@ -78,6 +78,8 @@ public:
std::vector<SymbolInstance> symbolInstances;
+ std::map<std::string, style::SymbolPaintProperties::PossiblyEvaluated> paintProperties;
+
std::map<std::string, std::pair<
SymbolIconProgram::PaintPropertyBinders,
SymbolSDFTextProgram::PaintPropertyBinders>> paintPropertyBinders;