diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-01-11 18:55:56 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-01-14 12:53:44 +0200 |
commit | 12295ef3355170d1877da5ef183eecfe7ad982be (patch) | |
tree | 68a11fc84042d9eb38cb62622dd3066d90bb1952 /src/mbgl/renderer/buckets/symbol_bucket.hpp | |
parent | 4db55c3ace71fcc07c3ba4de99d411bf59d46397 (diff) | |
download | qtlocation-mapboxgl-12295ef3355170d1877da5ef183eecfe7ad982be.tar.gz |
[core] SymbolBucket: use single map for paint properties data
Obviates unnecessary lookups, improves readability.
Diffstat (limited to 'src/mbgl/renderer/buckets/symbol_bucket.hpp')
-rw-r--r-- | src/mbgl/renderer/buckets/symbol_bucket.hpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mbgl/renderer/buckets/symbol_bucket.hpp b/src/mbgl/renderer/buckets/symbol_bucket.hpp index 76fab2fa0f..0388c5756b 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, - std::map<std::string, style::SymbolPaintProperties::PossiblyEvaluated>, + const std::map<std::string, style::SymbolPaintProperties::PossiblyEvaluated>&, const style::PropertyValue<float>& textSize, const style::PropertyValue<float>& iconSize, float zoom, @@ -78,11 +78,12 @@ public: std::vector<SymbolInstance> symbolInstances; - std::map<std::string, style::SymbolPaintProperties::PossiblyEvaluated> paintProperties; - - std::map<std::string, std::pair< - SymbolIconProgram::PaintPropertyBinders, - SymbolSDFTextProgram::PaintPropertyBinders>> paintPropertyBinders; + struct PaintProperties { + style::SymbolPaintProperties::PossiblyEvaluated evaluated; + SymbolIconProgram::PaintPropertyBinders iconBinders; + SymbolSDFTextProgram::PaintPropertyBinders textBinders; + }; + std::map<std::string, PaintProperties> paintProperties; std::unique_ptr<SymbolSizeBinder> textSizeBinder; |