From 5aa0caf5c50df26e0ce4a4f42b22d0647e6b1ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Thu, 30 Apr 2015 14:35:49 +0200 Subject: [PATCH] don't trigger cleanups when we're not rendering --- src/mbgl/map/map_context.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp index 160977978..4e0a04472 100644 --- a/src/mbgl/map/map_context.cpp +++ b/src/mbgl/map/map_context.cpp @@ -286,7 +286,7 @@ void MapContext::setSourceTileCacheSize(size_t size) { for (const auto &source : style->sources) { source->setCacheSize(sourceCacheSize); } - env.performCleanup(); + view.invalidate([this] { render(); }); } } @@ -296,7 +296,7 @@ void MapContext::onLowMemory() { for (const auto &source : style->sources) { source->onLowMemory(); } - env.performCleanup(); + view.invalidate([this] { render(); }); } }