diff options
Diffstat (limited to 'benchmark/src')
-rw-r--r-- | benchmark/src/mbgl/benchmark/util.cpp | 8 | ||||
-rw-r--r-- | benchmark/src/mbgl/benchmark/util.hpp | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/benchmark/src/mbgl/benchmark/util.cpp b/benchmark/src/mbgl/benchmark/util.cpp index a8f71f1206..39c5f86883 100644 --- a/benchmark/src/mbgl/benchmark/util.cpp +++ b/benchmark/src/mbgl/benchmark/util.cpp @@ -1,16 +1,18 @@ #include <mbgl/benchmark/util.hpp> +#include <mbgl/platform/default/offscreen_view.hpp> #include <mbgl/map/map.hpp> +#include <mbgl/map/view.hpp> #include <mbgl/util/image.hpp> #include <mbgl/util/run_loop.hpp> namespace mbgl { namespace benchmark { -void render(Map& map) { +void render(Map& map, OffscreenView& view) { PremultipliedImage result; - map.renderStill([&result](std::exception_ptr, PremultipliedImage&& image) { - result = std::move(image); + map.renderStill(view, [&](std::exception_ptr) { + result = view.readStillImage(); }); while (!result.size()) { diff --git a/benchmark/src/mbgl/benchmark/util.hpp b/benchmark/src/mbgl/benchmark/util.hpp index 759015e0e3..73acfb69d5 100644 --- a/benchmark/src/mbgl/benchmark/util.hpp +++ b/benchmark/src/mbgl/benchmark/util.hpp @@ -3,10 +3,11 @@ namespace mbgl { class Map; +class OffscreenView; namespace benchmark { -void render(Map&); +void render(Map&, OffscreenView&); } // namespace benchmark } // namespace mbgl |