[core] Refactor CustomLayer internals

Move the responsibility for initialization/deinitialization/rendering to RenderCustomLayer. This eliminates special case code from Map and Style.
This commit is contained in:
John Firebaugh
2017-06-14 16:21:02 -07:00
parent e4201e207c
commit be7e9bbb8d
10 changed files with 70 additions and 85 deletions

View File

@@ -14,6 +14,8 @@
#include <mbgl/annotation/annotation_tile.hpp>
#include <mbgl/renderer/image_manager.hpp>
#include <mbgl/text/glyph_manager.hpp>
#include <mbgl/map/backend_scope.hpp>
#include <mbgl/gl/headless_backend.hpp>
#include <memory>
@@ -26,6 +28,8 @@ public:
util::RunLoop loop;
ThreadPool threadPool { 1 };
AnnotationManager annotationManager;
HeadlessBackend backend { test::sharedDisplay() };
BackendScope scope { backend };
RenderStyle style { threadPool, fileSource };
ImageManager imageManager;
GlyphManager glyphManager { fileSource };