diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2016-05-27 23:24:25 +0300 |
---|---|---|
committer | Brad Leege <bleege@gmail.com> | 2016-05-27 16:21:02 -0500 |
commit | 623b81fe0e199445350357c8c22088f4ac5cb52b (patch) | |
tree | d81964e878002fd4b81cadde4ca112af705801a9 /src | |
parent | 9f9b310a2faaa4948f29962088cca24764985d6b (diff) | |
download | qtlocation-mapboxgl-623b81fe0e199445350357c8c22088f4ac5cb52b.tar.gz |
[core] Fill the initial `changeTimes` with the reference timestamp of the first frame
On the Javascript implementation the array is automatically filled with
zeroes which is not the same thing as `TimePoint::min()`. Here we need
to get our own "zero" which is the timestamp of the first frame.
Fixes #5109
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/renderer/frame_history.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/renderer/frame_history.cpp b/src/mbgl/renderer/frame_history.cpp index 74856ec87e..09337c87a0 100644 --- a/src/mbgl/renderer/frame_history.cpp +++ b/src/mbgl/renderer/frame_history.cpp @@ -4,7 +4,6 @@ using namespace mbgl; FrameHistory::FrameHistory() { - changeTimes.fill(TimePoint::min()); changeOpacities.fill(0); opacities.fill(0); }; @@ -14,6 +13,7 @@ void FrameHistory::record(const TimePoint& now, float zoom, const Duration& dura int16_t zoomIndex = std::floor(zoom * 10.0); if (firstFrame) { + changeTimes.fill(now); for (int16_t z = 0; z <= zoomIndex; z++) { opacities[z] = 255u; |