diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-10-06 13:23:50 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-10-25 13:52:36 -0700 |
commit | 5cc390d694fc7510d445310d8eb9e32429a5e67b (patch) | |
tree | 7a24706f919ac3e8154be8b4ce33aed5bf42188d /test/api/repeated_render.test.cpp | |
parent | 45f4dc0166f2d609d014d2174209fdbe1994c943 (diff) | |
download | qtlocation-mapboxgl-5cc390d694fc7510d445310d8eb9e32429a5e67b.tar.gz |
[core] separate Backend from View for headless rendering
Diffstat (limited to 'test/api/repeated_render.test.cpp')
-rw-r--r-- | test/api/repeated_render.test.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/api/repeated_render.test.cpp b/test/api/repeated_render.test.cpp index 4229f9d7ad..5bc57198bd 100644 --- a/test/api/repeated_render.test.cpp +++ b/test/api/repeated_render.test.cpp @@ -2,7 +2,7 @@ #include <mbgl/test/fixture_log_observer.hpp> #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/storage/default_file_source.hpp> @@ -19,9 +19,8 @@ TEST(API, RepeatedRender) { const auto style = util::read_file("test/fixtures/api/water.json"); - auto display = std::make_shared<mbgl::HeadlessDisplay>(); - HeadlessView view(display, 1, 256, 512); - + HeadlessBackend backend; + HeadlessView view(1, 256, 512); #ifdef MBGL_ASSET_ZIP // Regenerate with `cd test/fixtures/api/ && zip -r assets.zip assets/` DefaultFileSource fileSource(":memory:", "test/fixtures/api/assets.zip"); @@ -33,7 +32,7 @@ TEST(API, RepeatedRender) { Log::setObserver(std::make_unique<FixtureLogObserver>()); - Map map(view, fileSource, threadPool, MapMode::Still); + Map map(backend, view, view.getPixelRatio(), fileSource, threadPool, MapMode::Still); { map.setStyleJSON(style); |