diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2017-06-13 10:50:16 +0300 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2017-07-18 10:45:12 +0200 |
commit | 3832f8d0d8194b81ea34a045e19b0d5bc7a89e25 (patch) | |
tree | bbb4b277e1e74bde457271b9b9a5b6a9ec3ad5fb /test/api/api_misuse.test.cpp | |
parent | 39a732d7ae3cb1b927d94c4b1154b42d9565356a (diff) | |
download | qtlocation-mapboxgl-3832f8d0d8194b81ea34a045e19b0d5bc7a89e25.tar.gz |
[core] renderer interface
Diffstat (limited to 'test/api/api_misuse.test.cpp')
-rw-r--r-- | test/api/api_misuse.test.cpp | 11 |
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(); |