summaryrefslogtreecommitdiff
path: root/platform/default
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2018-08-30 17:26:04 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2018-10-19 12:05:16 +0200
commitb94be6e68f666410852aebd638782601162809d6 (patch)
tree91774c156316838c28e49ba8b6a167749c974591 /platform/default
parent98c36fc06edb99b2db20d474c4c3ec6bf51e219d (diff)
downloadqtlocation-mapboxgl-b94be6e68f666410852aebd638782601162809d6.tar.gz
[core] Add TransformState::getCameraOptions()
Diffstat (limited to 'platform/default')
-rw-r--r--platform/default/mbgl/gl/headless_frontend.cpp8
-rw-r--r--platform/default/mbgl/gl/headless_frontend.hpp2
2 files changed, 10 insertions, 0 deletions
diff --git a/platform/default/mbgl/gl/headless_frontend.cpp b/platform/default/mbgl/gl/headless_frontend.cpp
index 4263d2b148..c87a2796c9 100644
--- a/platform/default/mbgl/gl/headless_frontend.cpp
+++ b/platform/default/mbgl/gl/headless_frontend.cpp
@@ -55,6 +55,14 @@ RendererBackend* HeadlessFrontend::getBackend() {
return &backend;
}
+CameraOptions HeadlessFrontend::getCameraOptions() {
+ if (updateParameters)
+ return RendererState::getCameraOptions(*updateParameters);
+
+ static CameraOptions nullCamera;
+ return nullCamera;
+}
+
void HeadlessFrontend::setSize(Size size_) {
if (size != size_) {
size = size_;
diff --git a/platform/default/mbgl/gl/headless_frontend.hpp b/platform/default/mbgl/gl/headless_frontend.hpp
index 8ae617d37b..29ab30c93d 100644
--- a/platform/default/mbgl/gl/headless_frontend.hpp
+++ b/platform/default/mbgl/gl/headless_frontend.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include <mbgl/map/camera.hpp>
#include <mbgl/renderer/mode.hpp>
#include <mbgl/renderer/renderer_frontend.hpp>
#include <mbgl/gl/headless_backend.hpp>
@@ -32,6 +33,7 @@ public:
Renderer* getRenderer();
RendererBackend* getBackend();
+ CameraOptions getCameraOptions();
PremultipliedImage readStillImage();
PremultipliedImage render(Map&);