summaryrefslogtreecommitdiff
path: root/bin/render.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-10-06 13:23:50 +0200
committerKonstantin Käfer <mail@kkaefer.com>2016-10-25 13:52:36 -0700
commit5cc390d694fc7510d445310d8eb9e32429a5e67b (patch)
tree7a24706f919ac3e8154be8b4ce33aed5bf42188d /bin/render.cpp
parent45f4dc0166f2d609d014d2174209fdbe1994c943 (diff)
downloadqtlocation-mapboxgl-5cc390d694fc7510d445310d8eb9e32429a5e67b.tar.gz
[core] separate Backend from View for headless rendering
Diffstat (limited to 'bin/render.cpp')
-rw-r--r--bin/render.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/render.cpp b/bin/render.cpp
index e4d9951c05..f9574d0523 100644
--- a/bin/render.cpp
+++ b/bin/render.cpp
@@ -3,7 +3,7 @@
#include <mbgl/util/io.hpp>
#include <mbgl/util/run_loop.hpp>
-#include <mbgl/platform/default/headless_display.hpp>
+#include <mbgl/platform/default/headless_backend.hpp>
#include <mbgl/platform/default/headless_view.hpp>
#include <mbgl/platform/default/thread_pool.hpp>
#include <mbgl/storage/default_file_source.hpp>
@@ -84,9 +84,10 @@ int main(int argc, char *argv[]) {
fileSource.setAccessToken(std::string(token));
}
+ HeadlessBackend backend;
HeadlessView view(pixelRatio, width, height);
ThreadPool threadPool(4);
- Map map(view, fileSource, threadPool, MapMode::Still);
+ Map map(backend, view, view.getPixelRatio(), fileSource, threadPool, MapMode::Still);
map.setStyleJSON(style);
map.setClasses(classes);