summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-09-10 18:54:26 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-09-12 00:40:08 +0300
commit03dadb1cea7abd95c178a5eb3603b54b5cb1dcdb (patch)
treebd15d478bf01429176ad9777d70d25b7afef0de8
parent3f1d7ede66093f9c23e76c4993c70a969fe74e3d (diff)
downloadqtlocation-mapboxgl-03dadb1cea7abd95c178a5eb3603b54b5cb1dcdb.tar.gz
[core] Set fading tiles flag at TilePyramid::updateFadingTiles()
-rw-r--r--src/mbgl/renderer/tile_pyramid.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/renderer/tile_pyramid.cpp b/src/mbgl/renderer/tile_pyramid.cpp
index 54e0b1eb26..7f0fad1500 100644
--- a/src/mbgl/renderer/tile_pyramid.cpp
+++ b/src/mbgl/renderer/tile_pyramid.cpp
@@ -221,8 +221,6 @@ void TilePyramid::update(const std::vector<Immutable<style::LayerProperties>>& l
pair.second->setShowCollisionBoxes(parameters.debugOptions & MapDebugOptions::Collision);
}
- fadingTiles = false;
-
// Initialize renderable tiles and update the contained layer render data.
for (auto& entry : renderedTiles) {
Tile& tile = entry.second;
@@ -230,7 +228,6 @@ void TilePyramid::update(const std::vector<Immutable<style::LayerProperties>>& l
tile.usedByRenderedLayers = false;
const bool holdForFade = tile.holdForFade();
- fadingTiles = (fadingTiles || holdForFade);
for (const auto& layerProperties : layers) {
const auto* typeInfo = layerProperties->baseImpl->getTypeInfo();
if (holdForFade && typeInfo->fadingTiles == LayerTypeInfo::FadingTiles::NotRequired) {
@@ -374,6 +371,7 @@ void TilePyramid::dumpDebugLogs() const {
}
void TilePyramid::clearAll() {
+ fadingTiles = false;
tiles.clear();
renderedTiles.clear();
cache.clear();
@@ -385,9 +383,11 @@ void TilePyramid::addRenderTile(const UnwrappedTileID& tileID, Tile& tile) {
}
void TilePyramid::updateFadingTiles() {
+ fadingTiles = false;
for (auto& entry : renderedTiles) {
Tile& tile = entry.second;
if (tile.holdForFade()) {
+ fadingTiles = true;
tile.performedFadePlacement();
}
}