Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] Fill the initial changeTimes with the reference timestamp of…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
tmpsantos authored and bleege committed May 27, 2016
1 parent 9f9b310 commit 623b81f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mbgl/renderer/frame_history.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using namespace mbgl;

FrameHistory::FrameHistory() {
changeTimes.fill(TimePoint::min());
changeOpacities.fill(0);
opacities.fill(0);
};
Expand All @@ -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;
Expand Down

0 comments on commit 623b81f

Please sign in to comment.