From 68440ee6c27a8c1cdd3e179794862e59d3eb5344 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 16 Jan 2017 15:07:18 -0800 Subject: [PATCH] [core] Allow tile cache size to change with viewport size --- src/mbgl/style/source_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mbgl/style/source_impl.cpp b/src/mbgl/style/source_impl.cpp index 452df80f6..003df4f6b 100644 --- a/src/mbgl/style/source_impl.cpp +++ b/src/mbgl/style/source_impl.cpp @@ -139,7 +139,7 @@ void Source::Impl::updateTiles(const UpdateParameters& parameters) { algorithm::updateRenderables(getTileFn, createTileFn, retainTileFn, renderTileFn, idealTiles, zoomRange, tileZoom); - if (type != SourceType::Annotations && cache.getSize() == 0) { + if (type != SourceType::Annotations) { size_t conservativeCacheSize = std::max((float)parameters.transformState.getSize().width / tileSize, 1.0f) * std::max((float)parameters.transformState.getSize().height / tileSize, 1.0f) *