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

Commit

Permalink
[core] Factor timePoint initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed May 3, 2017
1 parent 88093bd commit 3790caa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/mbgl/map/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ void Map::Impl::render(View& view) {
return;
}

TimePoint timePoint = Clock::now();
TimePoint timePoint = mode == MapMode::Continuous
? Clock::now()
: Clock::time_point::max();

auto flags = transform.updateTransitions(timePoint);

Expand Down
4 changes: 2 additions & 2 deletions src/mbgl/style/style.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ void Style::cascade(const TimePoint& timePoint, MapMode mode) {

const CascadeParameters parameters {
classIDs,
mode == MapMode::Continuous ? timePoint : Clock::time_point::max(),
timePoint,
mode == MapMode::Continuous ? transitionOptions : immediateTransition
};

Expand All @@ -382,7 +382,7 @@ void Style::recalculate(float z, const TimePoint& timePoint, MapMode mode) {

const PropertyEvaluationParameters parameters {
z,
mode == MapMode::Continuous ? timePoint : Clock::time_point::max(),
timePoint,
zoomHistory,
mode == MapMode::Continuous ? util::DEFAULT_FADE_DURATION : Duration::zero()
};
Expand Down

0 comments on commit 3790caa

Please sign in to comment.