diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-06-03 16:22:54 +0300 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-06-03 17:03:57 +0300 |
commit | b2428835871933ecf5a93e86493bac0b76db0ede (patch) | |
tree | c53eeea19bfc01438cc4c9394a41056ffc76cc38 /src/mbgl/text/placement.hpp | |
parent | a44b7f1e5ddae61260e55db5b68b10d9aa5e711d (diff) | |
download | qtlocation-mapboxgl-b2428835871933ecf5a93e86493bac0b76db0ede.tar.gz |
[core] Use fresh transform state for bucket vertices update in placement
The transform state cached in placement might get stale and cannot be used for bucket vertices updates.
Diffstat (limited to 'src/mbgl/text/placement.hpp')
-rw-r--r-- | src/mbgl/text/placement.hpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mbgl/text/placement.hpp b/src/mbgl/text/placement.hpp index 69d05c94db..6ffe58afc5 100644 --- a/src/mbgl/text/placement.hpp +++ b/src/mbgl/text/placement.hpp @@ -101,7 +101,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 updateLayerBuckets(const RenderLayer&, bool updateOpacities); + void updateLayerBuckets(const RenderLayer&, const TransformState&, bool updateOpacities); float symbolFadeChange(TimePoint now) const; bool hasTransitions(TimePoint now) const; @@ -119,13 +119,12 @@ private: const BucketPlacementParameters&, std::set<uint32_t>& seenCrossTileIDs); // Returns `true` if bucket vertices were updated; returns `false` otherwise. - bool updateBucketDynamicVertices(SymbolBucket& bucket, const RenderTile& tile); - void updateBucketOpacities(SymbolBucket&, std::set<uint32_t>&); + bool updateBucketDynamicVertices(SymbolBucket&, const TransformState&, const RenderTile& tile); + void updateBucketOpacities(SymbolBucket&, const TransformState&, std::set<uint32_t>&); void markUsedJustification(SymbolBucket&, style::TextVariableAnchorType, SymbolInstance&); CollisionIndex collisionIndex; - TransformState state; MapMode mapMode; style::TransitionOptions transitionOptions; |