diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2018-07-31 14:21:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-31 14:21:47 -0700 |
commit | 9bdd765a02de75851a00ab85223d5d582a104757 (patch) | |
tree | bcb417a47808a4a94c171b083c7f2e2cce457107 /src/mbgl/renderer/buckets/symbol_bucket.cpp | |
parent | 885f6e3c02138398d094e49243817a83349b4d50 (diff) | |
download | qtlocation-mapboxgl-9bdd765a02de75851a00ab85223d5d582a104757.tar.gz |
[core] Merge DataDrivenPropertyValue into PropertyValue (#12513)
Diffstat (limited to 'src/mbgl/renderer/buckets/symbol_bucket.cpp')
-rw-r--r-- | src/mbgl/renderer/buckets/symbol_bucket.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mbgl/renderer/buckets/symbol_bucket.cpp b/src/mbgl/renderer/buckets/symbol_bucket.cpp index 0a1530ae74..027e864be5 100644 --- a/src/mbgl/renderer/buckets/symbol_bucket.cpp +++ b/src/mbgl/renderer/buckets/symbol_bucket.cpp @@ -12,8 +12,8 @@ SymbolBucket::SymbolBucket(style::SymbolLayoutProperties::PossiblyEvaluated layo const std::map<std::string, std::pair< style::IconPaintProperties::PossiblyEvaluated, style::TextPaintProperties::PossiblyEvaluated>>& layerPaintProperties, - const style::DataDrivenPropertyValue<float>& textSize, - const style::DataDrivenPropertyValue<float>& iconSize, + const style::PropertyValue<float>& textSize, + const style::PropertyValue<float>& iconSize, float zoom, bool sdfIcons_, bool iconsNeedLinear_, @@ -29,7 +29,7 @@ SymbolBucket::SymbolBucket(style::SymbolLayoutProperties::PossiblyEvaluated layo symbolInstances(std::move(symbolInstances_)), textSizeBinder(SymbolSizeBinder::create(zoom, textSize, TextSize::defaultValue())), iconSizeBinder(SymbolSizeBinder::create(zoom, iconSize, IconSize::defaultValue())) { - + for (const auto& pair : layerPaintProperties) { paintPropertyBinders.emplace( std::piecewise_construct, @@ -49,7 +49,7 @@ void SymbolBucket::upload(gl::Context& context) { } else if (!sortUploaded) { context.updateIndexBuffer(*text.indexBuffer, std::move(text.triangles)); } - + if (!dynamicUploaded) { text.dynamicVertexBuffer = context.createVertexBuffer(std::move(text.dynamicVertices), gl::BufferUsage::StreamDraw); } @@ -94,7 +94,7 @@ void SymbolBucket::upload(gl::Context& context) { } } } - + if (hasCollisionCircleData()) { if (!staticUploaded) { collisionCircle.indexBuffer = context.createIndexBuffer(std::move(collisionCircle.triangles)); @@ -115,7 +115,7 @@ void SymbolBucket::upload(gl::Context& context) { pair.second.second.upload(context); } } - + uploaded = true; staticUploaded = true; placementChangesUploaded = true; @@ -164,7 +164,7 @@ void SymbolBucket::sortFeatures(const float angle) { if (sortedAngle && *sortedAngle == angle) { return; } - + sortedAngle = angle; // The current approach to sorting doesn't sort across segments so don't try. @@ -172,7 +172,7 @@ void SymbolBucket::sortFeatures(const float angle) { if (text.segments.size() > 1 || icon.segments.size() > 1) { return; } - + sortUploaded = false; uploaded = false; @@ -186,7 +186,7 @@ void SymbolBucket::sortFeatures(const float angle) { for (size_t i = 0; i < symbolInstances.size(); i++) { symbolInstanceIndexes.push_back(i); } - + const float sin = std::sin(angle); const float cos = std::cos(angle); @@ -205,7 +205,7 @@ void SymbolBucket::sortFeatures(const float angle) { featureSortOrder = std::make_unique<std::vector<size_t>>(); featureSortOrder->reserve(symbolInstanceIndexes.size()); - + for (auto i : symbolInstanceIndexes) { const SymbolInstance& symbolInstance = symbolInstances[i]; featureSortOrder->push_back(symbolInstance.dataFeatureIndex); |