summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorThomas Moenicke <thomas.moenicke@mapbox.com>2020-02-03 19:10:57 +0200
committerGitHub <noreply@github.com>2020-02-03 19:10:57 +0200
commitb64ed754442b894f3914a4191798fbd2f2bc8cd9 (patch)
tree59bb14829d7cdd5f2466dad4cffb74c4d1b80068 /platform
parent2e10d3548a8b3aff1f28b9514594c3c14509f084 (diff)
downloadqtlocation-mapboxgl-b64ed754442b894f3914a4191798fbd2f2bc8cd9.tar.gz
[build] Adding a build flag to build without GL if needed (#16120)
* [build] Adding a build flag to build without GL if needed * [build] Moving custom layer to mbgl/gl
Diffstat (limited to 'platform')
-rw-r--r--platform/android/src/example_custom_layer.cpp6
-rw-r--r--platform/android/src/style/layers/custom_layer.hpp6
-rw-r--r--platform/darwin/src/MGLOpenGLStyleLayer.mm2
-rw-r--r--platform/darwin/src/MGLOpenGLStyleLayer_Private.h2
-rw-r--r--platform/default/src/mbgl/layermanager/layer_manager.cpp6
-rw-r--r--platform/ios/src/MGLMapView.mm2
-rw-r--r--platform/qt/src/qmapboxgl.cpp2
7 files changed, 15 insertions, 11 deletions
diff --git a/platform/android/src/example_custom_layer.cpp b/platform/android/src/example_custom_layer.cpp
index e805532541..e1b80ffba5 100644
--- a/platform/android/src/example_custom_layer.cpp
+++ b/platform/android/src/example_custom_layer.cpp
@@ -1,8 +1,8 @@
-#include <jni.h>
#include <GLES2/gl2.h>
-#include <sstream>
#include <android/log.h>
-#include <mbgl/style/layers/custom_layer.hpp>
+#include <jni.h>
+#include <mbgl/gl/custom_layer.hpp>
+#include <sstream>
// DEBUGGING
diff --git a/platform/android/src/style/layers/custom_layer.hpp b/platform/android/src/style/layers/custom_layer.hpp
index 0d6f4a408d..dc328a2137 100644
--- a/platform/android/src/style/layers/custom_layer.hpp
+++ b/platform/android/src/style/layers/custom_layer.hpp
@@ -1,9 +1,9 @@
#pragma once
-#include "layer.hpp"
-#include <mbgl/layermanager/custom_layer_factory.hpp>
-#include <mbgl/style/layers/custom_layer.hpp>
#include <jni/jni.hpp>
+#include <mbgl/gl/custom_layer.hpp>
+#include <mbgl/gl/custom_layer_factory.hpp>
+#include "layer.hpp"
namespace mbgl {
namespace android {
diff --git a/platform/darwin/src/MGLOpenGLStyleLayer.mm b/platform/darwin/src/MGLOpenGLStyleLayer.mm
index b010e363b3..8c9e4b02a2 100644
--- a/platform/darwin/src/MGLOpenGLStyleLayer.mm
+++ b/platform/darwin/src/MGLOpenGLStyleLayer.mm
@@ -6,7 +6,7 @@
#import "MGLStyleLayer_Private.h"
#import "MGLGeometry_Private.h"
-#include <mbgl/style/layers/custom_layer.hpp>
+#include <mbgl/gl/custom_layer.hpp>
#include <mbgl/math/wrap.hpp>
class MGLOpenGLLayerHost : public mbgl::style::CustomLayerHost {
diff --git a/platform/darwin/src/MGLOpenGLStyleLayer_Private.h b/platform/darwin/src/MGLOpenGLStyleLayer_Private.h
index 27a536c60c..15dd6bf816 100644
--- a/platform/darwin/src/MGLOpenGLStyleLayer_Private.h
+++ b/platform/darwin/src/MGLOpenGLStyleLayer_Private.h
@@ -2,7 +2,7 @@
#include "MGLStyleLayer_Private.h"
-#include <mbgl/layermanager/custom_layer_factory.hpp>
+#include <mbgl/gl/custom_layer_factory.hpp>
namespace mbgl {
diff --git a/platform/default/src/mbgl/layermanager/layer_manager.cpp b/platform/default/src/mbgl/layermanager/layer_manager.cpp
index b8abf794fc..f9e46d78ab 100644
--- a/platform/default/src/mbgl/layermanager/layer_manager.cpp
+++ b/platform/default/src/mbgl/layermanager/layer_manager.cpp
@@ -2,7 +2,9 @@
#include <mbgl/layermanager/background_layer_factory.hpp>
#include <mbgl/layermanager/circle_layer_factory.hpp>
-#include <mbgl/layermanager/custom_layer_factory.hpp>
+#ifdef MBGL_RENDER_BACKEND_OPENGL
+#include <mbgl/gl/custom_layer_factory.hpp>
+#endif
#include <mbgl/layermanager/fill_extrusion_layer_factory.hpp>
#include <mbgl/layermanager/fill_layer_factory.hpp>
#include <mbgl/layermanager/heatmap_layer_factory.hpp>
@@ -59,9 +61,11 @@ LayerManagerDefault::LayerManagerDefault() {
#if !defined(MBGL_LAYER_HEATMAP_DISABLE_ALL)
addLayerType(std::make_unique<HeatmapLayerFactory>());
#endif
+#ifdef MBGL_RENDER_BACKEND_OPENGL
#if !defined(MBGL_LAYER_CUSTOM_DISABLE_ALL)
addLayerType(std::make_unique<CustomLayerFactory>());
#endif
+#endif
}
void LayerManagerDefault::addLayerType(std::unique_ptr<LayerFactory> factory) {
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index d8470aa999..1f4e2ffa74 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -4,6 +4,7 @@
#include <mbgl/map/map.hpp>
#include <mbgl/map/map_options.hpp>
#include <mbgl/annotation/annotation.hpp>
+#include <mbgl/gl/custom_layer.hpp>
#include <mbgl/map/camera.hpp>
#include <mbgl/map/mode.hpp>
#include <mbgl/util/platform.hpp>
@@ -13,7 +14,6 @@
#include <mbgl/style/style.hpp>
#include <mbgl/style/image.hpp>
#include <mbgl/style/transition_options.hpp>
-#include <mbgl/style/layers/custom_layer.hpp>
#include <mbgl/renderer/renderer.hpp>
#include <mbgl/math/wrap.hpp>
#include <mbgl/util/exception.hpp>
diff --git a/platform/qt/src/qmapboxgl.cpp b/platform/qt/src/qmapboxgl.cpp
index fd72e8cf02..ab99173b2a 100644
--- a/platform/qt/src/qmapboxgl.cpp
+++ b/platform/qt/src/qmapboxgl.cpp
@@ -9,6 +9,7 @@
#include <mbgl/actor/scheduler.hpp>
#include <mbgl/annotation/annotation.hpp>
+#include <mbgl/gl/custom_layer.hpp>
#include <mbgl/map/camera.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/map/map_options.hpp>
@@ -28,7 +29,6 @@
#include <mbgl/style/image.hpp>
#include <mbgl/style/layers/background_layer.hpp>
#include <mbgl/style/layers/circle_layer.hpp>
-#include <mbgl/style/layers/custom_layer.hpp>
#include <mbgl/style/layers/fill_extrusion_layer.hpp>
#include <mbgl/style/layers/fill_layer.hpp>
#include <mbgl/style/layers/line_layer.hpp>