diff options
Diffstat (limited to 'test/api/custom_layer.test.cpp')
-rw-r--r-- | test/api/custom_layer.test.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/api/custom_layer.test.cpp b/test/api/custom_layer.test.cpp index 84ae780174..70de102b80 100644 --- a/test/api/custom_layer.test.cpp +++ b/test/api/custom_layer.test.cpp @@ -3,7 +3,7 @@ #include <mbgl/gl/gl.hpp> #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/storage/default_file_source.hpp> #include <mbgl/style/layers/custom_layer.hpp> @@ -86,7 +86,7 @@ TEST(CustomLayer, Basic) { util::RunLoop loop; HeadlessBackend backend; - HeadlessView view; + OffscreenView view(backend.getContext()); #ifdef MBGL_ASSET_ZIP // Regenerate with `cd test/fixtures/api/ && zip -r assets.zip assets/` @@ -97,7 +97,7 @@ TEST(CustomLayer, Basic) { ThreadPool threadPool(4); - Map map(backend, view, view.getPixelRatio(), fileSource, threadPool, MapMode::Still); + Map map(backend, view.getSize(), 1, fileSource, threadPool, MapMode::Still); map.setStyleJSON(util::read_file("test/fixtures/api/water.json")); map.setLatLngZoom({ 37.8, -122.5 }, 10); map.addLayer(std::make_unique<CustomLayer>( @@ -117,5 +117,5 @@ TEST(CustomLayer, Basic) { layer->setFillColor(Color{ 1.0, 1.0, 0.0, 1.0 }); map.addLayer(std::move(layer)); - test::checkImage("test/fixtures/custom_layer/basic", test::render(map), 0.0006, 0.1); + test::checkImage("test/fixtures/custom_layer/basic", test::render(map, view), 0.0006, 0.1); } |