summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2018-07-17 15:33:50 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2018-08-17 09:38:39 -0700
commit8ca419fb2ebbba427f2f27ba3d794fb3d6cc5797 (patch)
treed20c4176c368080144299b6e9e7e59c3116b48b5 /src/mbgl/renderer
parent790b9f5c827101a47fd06fbfa944d36e3f0b285c (diff)
downloadqtlocation-mapboxgl-8ca419fb2ebbba427f2f27ba3d794fb3d6cc5797.tar.gz
[core] Evict unused font stacks from GlyphManager
Diffstat (limited to 'src/mbgl/renderer')
-rw-r--r--src/mbgl/renderer/renderer_impl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp
index fea27403c9..d3f72b89b9 100644
--- a/src/mbgl/renderer/renderer_impl.cpp
+++ b/src/mbgl/renderer/renderer_impl.cpp
@@ -173,6 +173,10 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) {
renderLayers.at(entry.first)->setImpl(entry.second.after);
}
+ if (!layerDiff.removed.empty() || !layerDiff.added.empty() || !layerDiff.changed.empty()) {
+ glyphManager->evict(fontStacks(*updateParameters.layers));
+ }
+
// Update layers for class and zoom changes.
for (const auto& entry : renderLayers) {
RenderLayer& layer = *entry.second;