[core] mutate style on annotation mutations immediately

This commit is contained in:
Ivo van Dongen
2017-06-22 14:33:21 -07:00
committed by Ivo van Dongen
parent 8ae7010546
commit e35cbbae55
9 changed files with 77 additions and 75 deletions

View File

@@ -16,6 +16,7 @@
#include <mbgl/text/glyph_manager.hpp>
#include <mbgl/map/backend_scope.hpp>
#include <mbgl/gl/headless_backend.hpp>
#include <mbgl/style/style.hpp>
#include <memory>
@@ -27,10 +28,11 @@ public:
TransformState transformState;
util::RunLoop loop;
ThreadPool threadPool { 1 };
AnnotationManager annotationManager;
style::Style style { loop, fileSource, 1 };
AnnotationManager annotationManager { style };
HeadlessBackend backend { test::sharedDisplay() };
BackendScope scope { backend };
RenderStyle style { threadPool, fileSource };
RenderStyle renderStyle { threadPool, fileSource };
ImageManager imageManager;
GlyphManager glyphManager { fileSource };
@@ -92,7 +94,7 @@ TEST(AnnotationTile, Issue8289) {
TransformState transformState;
RenderedQueryOptions options;
tile.queryRenderedFeatures(result, queryGeometry, transformState, test.style, options);
tile.queryRenderedFeatures(result, queryGeometry, transformState, test.renderStyle, options);
EXPECT_TRUE(result.empty());
}