[core] separate Backend from View for headless rendering

This commit is contained in:
Konstantin Käfer
2016-10-06 13:23:50 +02:00
parent 45f4dc0166
commit 5cc390d694
54 changed files with 779 additions and 525 deletions

View File

@@ -1,5 +1,5 @@
#include <mbgl/map/map.hpp>
#include <mbgl/platform/default/headless_display.hpp>
#include <mbgl/platform/default/headless_backend.hpp>
#include <mbgl/platform/default/headless_view.hpp>
#include <mbgl/platform/default/thread_pool.hpp>
#include <mbgl/sprite/sprite_image.hpp>
@@ -26,11 +26,11 @@ public:
}
util::RunLoop loop;
std::shared_ptr<HeadlessDisplay> display { std::make_shared<HeadlessDisplay>() };
HeadlessView view { display, 1 };
HeadlessBackend backend;
HeadlessView view;
StubFileSource fileSource;
ThreadPool threadPool { 4 };
Map map { view, fileSource, threadPool, MapMode::Still };
Map map { backend, view, view.getPixelRatio(), fileSource, threadPool, MapMode::Still };
};
} // end namespace