[core] Back port changes for correct GL context in Map::onLowMemory()

This ports changes in
https://github.com/mapbox/mapbox-gl-native/pull/6972 to this version
of the map.
This commit is contained in:
Jesse Bounds
2016-11-09 10:43:25 -08:00
parent 8bf63ddb9c
commit 8a84f3b279

View File

@@ -833,7 +833,9 @@ void Map::setSourceTileCacheSize(size_t size) {
}
void Map::onLowMemory() {
impl->view.activate();
impl->store.performCleanup();
impl->view.deactivate();
if (!impl->style) return;
impl->style->onLowMemory();
impl->view.invalidate();