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.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/test/api/api_misuse.test.cpp b/test/api/api_misuse.test.cpp
index 54cde8d9b5..363958451b 100644
--- a/test/api/api_misuse.test.cpp
+++ b/test/api/api_misuse.test.cpp
@@ -3,9 +3,8 @@
#include <mbgl/test/fixture_log_observer.hpp>
#include <mbgl/map/map.hpp>
-#include <mbgl/map/backend_scope.hpp>
-#include <mbgl/gl/headless_backend.hpp>
-#include <mbgl/gl/offscreen_view.hpp>
+#include <mbgl/renderer/backend_scope.hpp>
+#include <mbgl/gl/headless_frontend.hpp>
#include <mbgl/storage/online_file_source.hpp>
#include <mbgl/util/default_thread_pool.hpp>
#include <mbgl/util/exception.hpp>
@@ -22,15 +21,14 @@ TEST(API, RenderWithoutCallback) {
util::RunLoop loop;
- HeadlessBackend backend { test::sharedDisplay() };
- BackendScope scope { backend };
- OffscreenView view { backend.getContext(), { 128, 512 } };
StubFileSource fileSource;
ThreadPool threadPool(4);
+ float pixelRatio { 1 };
+ HeadlessFrontend frontend { pixelRatio, fileSource, threadPool };
- std::unique_ptr<Map> map =
- std::make_unique<Map>(backend, view.getSize(), 1, fileSource, threadPool, MapMode::Still);
- map->renderStill(view, nullptr);
+ auto map = std::make_unique<Map>(frontend, MapObserver::nullObserver(), frontend.getSize(),
+ pixelRatio, fileSource, threadPool, MapMode::Static);
+ map->renderStill(nullptr);
// Force Map thread to join.
map.reset();