[core] move gl::Context to Backend and refactor View
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include <mbgl/map/map.hpp>
|
||||
#include <mbgl/platform/default/headless_backend.hpp>
|
||||
#include <mbgl/platform/default/headless_view.hpp>
|
||||
#include <mbgl/platform/default/offscreen_view.hpp>
|
||||
#include <mbgl/platform/default/thread_pool.hpp>
|
||||
#include <mbgl/sprite/sprite_image.hpp>
|
||||
#include <mbgl/test/stub_file_source.hpp>
|
||||
@@ -22,15 +22,15 @@ public:
|
||||
map.setStyleJSON(util::read_file("test/fixtures/api/query_style.json"));
|
||||
map.addImage("test-icon", std::move(image));
|
||||
|
||||
test::render(map);
|
||||
test::render(map, view);
|
||||
}
|
||||
|
||||
util::RunLoop loop;
|
||||
HeadlessBackend backend;
|
||||
HeadlessView view;
|
||||
OffscreenView view { backend.getContext() };
|
||||
StubFileSource fileSource;
|
||||
ThreadPool threadPool { 4 };
|
||||
Map map { backend, view, view.getPixelRatio(), fileSource, threadPool, MapMode::Still };
|
||||
Map map { backend, view.getSize(), 1, fileSource, threadPool, MapMode::Still };
|
||||
};
|
||||
|
||||
} // end namespace
|
||||
|
||||
Reference in New Issue
Block a user