summaryrefslogtreecommitdiff
path: root/test/src/mbgl/test/util.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-10-10 17:16:37 +0200
committerKonstantin Käfer <mail@kkaefer.com>2016-10-25 13:52:36 -0700
commita4d259c33f9bb890bba97fd89552720e3e0ec09b (patch)
tree342ecc27a6993c48f3a2e1d739fce890350bc44d /test/src/mbgl/test/util.cpp
parent5cc390d694fc7510d445310d8eb9e32429a5e67b (diff)
downloadqtlocation-mapboxgl-a4d259c33f9bb890bba97fd89552720e3e0ec09b.tar.gz
[core] move gl::Context to Backend and refactor View
Diffstat (limited to 'test/src/mbgl/test/util.cpp')
-rw-r--r--test/src/mbgl/test/util.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/src/mbgl/test/util.cpp b/test/src/mbgl/test/util.cpp
index a674eafeb4..7f98c43dc9 100644
--- a/test/src/mbgl/test/util.cpp
+++ b/test/src/mbgl/test/util.cpp
@@ -1,6 +1,7 @@
#include <mbgl/test/util.hpp>
#include <mbgl/map/map.hpp>
+#include <mbgl/platform/default/offscreen_view.hpp>
#include <mbgl/platform/log.hpp>
#include <mbgl/util/image.hpp>
#include <mbgl/util/io.hpp>
@@ -97,10 +98,10 @@ Server::~Server() {
}
}
-PremultipliedImage render(Map& map) {
+PremultipliedImage 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()) {