diff options
Diffstat (limited to 'benchmark/api/query.benchmark.cpp')
-rw-r--r-- | benchmark/api/query.benchmark.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/benchmark/api/query.benchmark.cpp b/benchmark/api/query.benchmark.cpp index 5fa6a84db7..5a95cd7666 100644 --- a/benchmark/api/query.benchmark.cpp +++ b/benchmark/api/query.benchmark.cpp @@ -3,7 +3,7 @@ #include <mbgl/benchmark/util.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/sprite/sprite_image.hpp> #include <mbgl/storage/default_file_source.hpp> @@ -29,17 +29,15 @@ public: auto image = std::make_unique<SpriteImage>(std::move(decoded), 1.0); map.addImage("test-icon", std::move(image)); - view.resize(1000, 1000); - - mbgl::benchmark::render(map); + mbgl::benchmark::render(map, view); } util::RunLoop loop; HeadlessBackend backend; - HeadlessView view; + OffscreenView view{ backend.getContext(), {{ 1000, 1000 }} }; DefaultFileSource fileSource{ "benchmark/fixtures/api/cache.db", "." }; ThreadPool threadPool{ 4 }; - Map map{ backend, view, view.getPixelRatio(), fileSource, threadPool, MapMode::Still }; + Map map{ backend, view.getSize(), 1, fileSource, threadPool, MapMode::Still }; ScreenBox box{{ 0, 0 }, { 1000, 1000 }}; }; |