[core] Use weak annotation manager

Map and renderer / orchestrator should be able to run on a separate threads,
however, legacy AnnotationManager is shared between Map and Renderer, therefore
is not a thread safe. Until AnnotationManager is deprecated and removed from a
code-base, use it only via weak pointers.
This commit is contained in:
Alexander Shalamov
2020-02-27 11:46:17 +02:00
parent c5155dcf33
commit 81e116d41a
14 changed files with 89 additions and 83 deletions

View File

@@ -31,17 +31,15 @@ public:
GlyphManager glyphManager;
Tileset tileset { { "https://example.com" }, { 0, 22 }, "none" };
TileParameters tileParameters {
1.0,
MapDebugOptions(),
transformState,
fileSource,
MapMode::Continuous,
annotationManager,
imageManager,
glyphManager,
0
};
TileParameters tileParameters{1.0,
MapDebugOptions(),
transformState,
fileSource,
MapMode::Continuous,
annotationManager.makeWeakPtr(),
imageManager,
glyphManager,
0};
};
TEST(VectorTile, setError) {