diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-07-21 16:36:31 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-07-26 09:50:38 -0700 |
commit | 32bd1d54fa777035920b58e653905e4592ef187c (patch) | |
tree | 3f6fa84d6c9369bdd312ba630538a0c7504fce3a /test/api/api_misuse.test.cpp | |
parent | 11933f6ab81248a884db3b1f69be714a60b6a86c (diff) | |
download | qtlocation-mapboxgl-32bd1d54fa777035920b58e653905e4592ef187c.tar.gz |
[node, tests] Consolidate headless rendering logic in HeadlessFrontend
Diffstat (limited to 'test/api/api_misuse.test.cpp')
-rw-r--r-- | test/api/api_misuse.test.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/test/api/api_misuse.test.cpp b/test/api/api_misuse.test.cpp index 9f53b763be..690c1548e5 100644 --- a/test/api/api_misuse.test.cpp +++ b/test/api/api_misuse.test.cpp @@ -4,11 +4,8 @@ #include <mbgl/map/map.hpp> #include <mbgl/renderer/backend_scope.hpp> -#include <mbgl/gl/headless_backend.hpp> -#include <mbgl/gl/offscreen_view.hpp> -#include <mbgl/test/stub_renderer_frontend.hpp> +#include <mbgl/gl/headless_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> @@ -24,16 +21,12 @@ TEST(API, RenderWithoutCallback) { util::RunLoop loop; - HeadlessBackend backend; - BackendScope scope { backend }; - 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 }; + HeadlessFrontend frontend { pixelRatio, fileSource, threadPool }; - auto map = std::make_unique<Map>(rendererFrontend, MapObserver::nullObserver(), view.getSize(), + auto map = std::make_unique<Map>(frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, fileSource, threadPool, MapMode::Still); map->renderStill(nullptr); |