summaryrefslogtreecommitdiff
path: root/test/api/api_misuse.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/api/api_misuse.test.cpp')
-rw-r--r--test/api/api_misuse.test.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/api/api_misuse.test.cpp b/test/api/api_misuse.test.cpp
index e5498576a8..742137d73d 100644
--- a/test/api/api_misuse.test.cpp
+++ b/test/api/api_misuse.test.cpp
@@ -6,7 +6,9 @@
#include <mbgl/map/backend_scope.hpp>
#include <mbgl/gl/headless_backend.hpp>
#include <mbgl/gl/offscreen_view.hpp>
+#include <mbgl/test/stub_renderer_frontend.hpp>
#include <mbgl/storage/online_file_source.hpp>
+#include <mbgl/renderer/renderer.hpp>
#include <mbgl/util/default_thread_pool.hpp>
#include <mbgl/util/exception.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -27,10 +29,13 @@ TEST(API, RenderWithoutCallback) {
OffscreenView view { backend.getContext(), { 128, 512 } };
StubFileSource fileSource;
ThreadPool threadPool(4);
+ float pixelRatio { 1 };
+ StubRendererFrontend rendererFrontend {
+ std::make_unique<Renderer>(backend, pixelRatio, fileSource, threadPool), view };
- std::unique_ptr<Map> map =
- std::make_unique<Map>(backend, MapObserver::nullObserver(), view.getSize(), 1, fileSource, threadPool, MapMode::Still);
- map->renderStill(view, nullptr);
+ auto map = std::make_unique<Map>(rendererFrontend, MapObserver::nullObserver(), view.getSize(),
+ pixelRatio, fileSource, threadPool, MapMode::Still);
+ map->renderStill(nullptr);
// Force Map thread to join.
map.reset();