[core] RenderTile does not expose Tile
RenderTile and Tile will be split when ochestration movces to a separate thread. This PR improves encapsulation of Tiles management: now performed within TilePyramid.
This commit is contained in:
@@ -340,7 +340,9 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) {
|
||||
if (placementChanged) {
|
||||
placement->commit(updateParameters.timePoint);
|
||||
crossTileSymbolIndex.pruneUnusedLayers(usedSymbolLayers);
|
||||
updateFadingTiles();
|
||||
for (const auto& entry : renderSources) {
|
||||
entry.second->updateFadingTiles();
|
||||
}
|
||||
} else {
|
||||
placement->setStale();
|
||||
}
|
||||
@@ -699,27 +701,16 @@ bool Renderer::Impl::hasTransitions(TimePoint timePoint) const {
|
||||
if (placement->hasTransitions(timePoint)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (fadingTiles) {
|
||||
return true;
|
||||
|
||||
for (const auto& entry : renderSources) {
|
||||
if (entry.second->hasFadingTiles()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Renderer::Impl::updateFadingTiles() {
|
||||
fadingTiles = false;
|
||||
for (auto& source : renderSources) {
|
||||
for (auto& renderTile : source.second->getRenderTiles()) {
|
||||
Tile& tile = renderTile.get().tile;
|
||||
if (tile.holdForFade()) {
|
||||
fadingTiles = true;
|
||||
tile.performedFadePlacement();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool Renderer::Impl::isLoaded() const {
|
||||
for (const auto& entry: renderSources) {
|
||||
if (!entry.second->isLoaded()) {
|
||||
|
||||
Reference in New Issue
Block a user