diff --git a/src/map/map.cpp b/src/map/map.cpp index d70821380..3c0fbbcbb 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -425,23 +425,20 @@ void Map::updateRenderState() { void Map::prepare() { view.make_active(); - // Update transitions + // Update transform transitions. animationTime = util::now(); if (transform.needsTransition()) { transform.updateTransitions(animationTime); } - const TransformState oldState = state; state = transform.currentState(); bool pixelRatioChanged = oldState.getPixelRatio() != state.getPixelRatio(); bool dimensionsChanged = oldState.getFramebufferWidth() != state.getFramebufferWidth() || oldState.getFramebufferHeight() != state.getFramebufferHeight(); - bool zoomChanged = oldState.getNormalizedZoom() != state.getNormalizedZoom(); if (pixelRatioChanged) { - // We have a pixelratio change style.sprite = std::make_shared(*this, state.getPixelRatio()); style.sprite->load(kSpriteURL); @@ -452,10 +449,9 @@ void Map::prepare() { painter.clearFramebuffers(); } - if (zoomChanged) { - style.cascade(state.getNormalizedZoom()); - } + style.cascade(state.getNormalizedZoom()); + // Update style transitions. animationTime = util::now(); if (style.needsTransition()) { style.updateTransitions(animationTime);