summaryrefslogtreecommitdiff
path: root/test/src
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
parent5cc390d694fc7510d445310d8eb9e32429a5e67b (diff)
downloadqtlocation-mapboxgl-a4d259c33f9bb890bba97fd89552720e3e0ec09b.tar.gz
[core] move gl::Context to Backend and refactor View
Diffstat (limited to 'test/src')
-rw-r--r--test/src/mbgl/test/util.cpp7
-rw-r--r--test/src/mbgl/test/util.hpp3
2 files changed, 6 insertions, 4 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()) {
diff --git a/test/src/mbgl/test/util.hpp b/test/src/mbgl/test/util.hpp
index ce0069131c..b8ecf175aa 100644
--- a/test/src/mbgl/test/util.hpp
+++ b/test/src/mbgl/test/util.hpp
@@ -52,6 +52,7 @@
namespace mbgl {
class Map;
+class OffscreenView;
namespace test {
@@ -64,7 +65,7 @@ private:
int fd = -1;
};
-PremultipliedImage render(Map&);
+PremultipliedImage render(Map&, OffscreenView&);
void checkImage(const std::string& base,
const PremultipliedImage& actual,