From 4c96603eb6b4b2f782b33d74cfa94a8c47484a62 Mon Sep 17 00:00:00 2001 From: Ivo van Dongen Date: Thu, 31 Aug 2017 15:42:28 +0300 Subject: [core] move annotation tile updates to renderer - AnnotationData.updateData() was not completely thread safe. Calling it from the renderer thread instead of the main thread fixes this - Since we moved the coalescing of updates out of the map and into the renderer frontend implementations, the updateData was called too much, resulting in degraded performance. Moving it into the renderer makes sure it gets coalesced again. --- src/mbgl/renderer/renderer_impl.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mbgl/renderer') diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp index 21ff8ed478..0c292e9830 100644 --- a/src/mbgl/renderer/renderer_impl.cpp +++ b/src/mbgl/renderer/renderer_impl.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -71,6 +72,8 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) { if (updateParameters.mode == MapMode::Still && !updateParameters.stillImageRequest) return; assert(BackendScope::exists()); + + updateParameters.annotationManager.updateData(); const bool zoomChanged = zoomHistory.update(updateParameters.transformState.getZoom(), updateParameters.timePoint); -- cgit v1.2.1