summaryrefslogtreecommitdiff
path: root/platform/default
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2018-10-24 11:23:05 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2018-10-25 16:23:40 +0300
commit55710cbb6799cc3802ef2dbb53d85134739cf83e (patch)
tree41626cbc18051d015d150403c2e0272b382d88b9 /platform/default
parent8e2214129eb30e278c2d8fc39801f6570b6f02e9 (diff)
downloadqtlocation-mapboxgl-55710cbb6799cc3802ef2dbb53d85134739cf83e.tar.gz
[core] Added RendererState::has{Image,Layer,Source}
Diffstat (limited to 'platform/default')
-rw-r--r--platform/default/mbgl/gl/headless_frontend.cpp24
-rw-r--r--platform/default/mbgl/gl/headless_frontend.hpp4
2 files changed, 28 insertions, 0 deletions
diff --git a/platform/default/mbgl/gl/headless_frontend.cpp b/platform/default/mbgl/gl/headless_frontend.cpp
index 1ec11a195f..30def38f71 100644
--- a/platform/default/mbgl/gl/headless_frontend.cpp
+++ b/platform/default/mbgl/gl/headless_frontend.cpp
@@ -64,6 +64,30 @@ CameraOptions HeadlessFrontend::getCameraOptions() {
return nullCamera;
}
+bool HeadlessFrontend::hasImage(const std::string& id) {
+ if (updateParameters) {
+ return RendererState::hasImage(*updateParameters, id);
+ }
+
+ return false;
+}
+
+bool HeadlessFrontend::hasLayer(const std::string& id) {
+ if (updateParameters) {
+ return RendererState::hasLayer(*updateParameters, id);
+ }
+
+ return false;
+}
+
+bool HeadlessFrontend::hasSource(const std::string& id) {
+ if (updateParameters) {
+ return RendererState::hasSource(*updateParameters, id);
+ }
+
+ return false;
+}
+
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 29ab30c93d..45586033b0 100644
--- a/platform/default/mbgl/gl/headless_frontend.hpp
+++ b/platform/default/mbgl/gl/headless_frontend.hpp
@@ -35,6 +35,10 @@ public:
RendererBackend* getBackend();
CameraOptions getCameraOptions();
+ bool hasImage(const std::string&);
+ bool hasLayer(const std::string&);
+ bool hasSource(const std::string&);
+
PremultipliedImage readStillImage();
PremultipliedImage render(Map&);