diff options
author | Ansis Brammanis <ansis@mapbox.com> | 2018-06-06 22:52:00 -0400 |
---|---|---|
committer | Ansis Brammanis <ansis.brammanis@gmail.com> | 2018-06-07 13:40:17 -0400 |
commit | 58b6c42f5d505204ea96faff812885f0d3723614 (patch) | |
tree | 2f66357d792fd6d55b2b5e99506c98aca5253643 /src/mbgl/text/placement.hpp | |
parent | 0a15be07aea4a8ba14b0c63a66f5db8066aaacce (diff) | |
download | qtlocation-mapboxgl-58b6c42f5d505204ea96faff812885f0d3723614.tar.gz |
[core] always commit placement to fix #11795
Since placements will be committed even if they do not need the full
fade duration to fade features in, we need the new `fadeStartTime` to
keep track of how long we still need to fade. This is important because
if we fade too long we will trigger another placement and never stop
rendering.
Diffstat (limited to 'src/mbgl/text/placement.hpp')
-rw-r--r-- | src/mbgl/text/placement.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/text/placement.hpp b/src/mbgl/text/placement.hpp index 0e1751b127..24de4c054a 100644 --- a/src/mbgl/text/placement.hpp +++ b/src/mbgl/text/placement.hpp @@ -63,7 +63,7 @@ class Placement { public: Placement(const TransformState&, MapMode mapMode); void placeLayer(RenderSymbolLayer&, const mat4&, bool showCollisionBoxes); - bool commit(const Placement& prevPlacement, TimePoint); + void commit(const Placement& prevPlacement, TimePoint); void updateLayerOpacities(RenderSymbolLayer&); float symbolFadeChange(TimePoint now) const; bool hasTransitions(TimePoint now) const; @@ -94,12 +94,12 @@ private: TransformState state; MapMode mapMode; + TimePoint fadeStartTime; TimePoint commitTime; std::unordered_map<uint32_t, JointPlacement> placements; std::unordered_map<uint32_t, JointOpacityState> opacities; - TimePoint recentUntil; bool stale = false; std::unordered_map<uint32_t, RetainedQueryData> retainedQueryData; |