blob: a8f71f12067a288c977a5e4d1509d9b672c78e2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <mbgl/benchmark/util.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/util/image.hpp>
#include <mbgl/util/run_loop.hpp>
namespace mbgl {
namespace benchmark {
void render(Map& map) {
PremultipliedImage result;
map.renderStill([&result](std::exception_ptr, PremultipliedImage&& image) {
result = std::move(image);
});
while (!result.size()) {
util::RunLoop::Get()->runOnce();
}
}
} // namespace benchmark
} // namespace mbgl
|