diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-05-22 16:41:40 +0300 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-05-24 10:54:06 +0300 |
commit | aa3a7cf02f2b5d0b99bec9d335c9681dcfa38426 (patch) | |
tree | 08d9826c1b419960a1e7a03b6fefb6d21aeab923 /src/mbgl/text/placement.hpp | |
parent | d8e9acd0f510a811f5c1fa87738be646ff83b715 (diff) | |
download | qtlocation-mapboxgl-aa3a7cf02f2b5d0b99bec9d335c9681dcfa38426.tar.gz |
[core] SymbolBucket updates complete at placement stage
`RenderSymbolLayer` does not have to update dynamic vertices of its buckets, this logic is moved to placement (which is already updates opacity vertices).
* fixes clustering of labels when text variable placement enabled - as assignes `usesVariablePlacement` per bucket
* simplifies the code in `RenderSymbolLayer` (the `RenderSymbolLayer::upload()` is now omitted).
* symbol buckets are not modified after orchestration finishes
Diffstat (limited to 'src/mbgl/text/placement.hpp')
-rw-r--r-- | src/mbgl/text/placement.hpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mbgl/text/placement.hpp b/src/mbgl/text/placement.hpp index e0fcac3350..c159286a2b 100644 --- a/src/mbgl/text/placement.hpp +++ b/src/mbgl/text/placement.hpp @@ -105,7 +105,7 @@ public: Placement(const TransformState&, MapMode, style::TransitionOptions, const bool crossSourceCollisions, std::unique_ptr<Placement> prevPlacementOrNull = nullptr); void placeLayer(const RenderLayer&, const mat4&, bool showCollisionBoxes); void commit(TimePoint); - void updateLayerOpacities(const RenderLayer&); + void updateLayerBuckets(const RenderLayer&, bool updateOpacities); float symbolFadeChange(TimePoint now) const; bool hasTransitions(TimePoint now) const; @@ -116,9 +116,6 @@ public: void setStale(); const RetainedQueryData& getQueryData(uint32_t bucketInstanceId) const; - using VariableOffsets = std::unordered_map<uint32_t, VariableOffset>; - const VariableOffsets& getVariableOffsets() const { return variableOffsets; } - private: friend SymbolBucket; void placeLayerBucket( @@ -126,6 +123,7 @@ private: const BucketPlacementParameters&, std::set<uint32_t>& seenCrossTileIDs); + void updateBucketDynamicVertices(SymbolBucket& bucket, const RenderTile& tile); void updateBucketOpacities(SymbolBucket&, std::set<uint32_t>&); void markUsedJustification(SymbolBucket&, style::TextVariableAnchorType, SymbolInstance&); |