summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-12-10 17:21:08 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-12-10 18:20:32 +0200
commitebd87a5442772e9e840cd5c00be56cccfddb5c68 (patch)
treeb65309b89e2d63f063369e97ccced610fd025a60
parentcbcd0875e375b06cbd163af105e8f1e0226f2df0 (diff)
downloadqtlocation-mapboxgl-ebd87a5442772e9e840cd5c00be56cccfddb5c68.tar.gz
[core, android, darwin] Move layer factories to separate files
-rw-r--r--cmake/core-files.txt20
-rw-r--r--include/mbgl/layermanager/background_layer_factory.hpp14
-rw-r--r--include/mbgl/layermanager/circle_layer_factory.hpp14
-rw-r--r--include/mbgl/layermanager/custom_layer_factory.hpp17
-rw-r--r--include/mbgl/layermanager/fill_extrusion_layer_factory.hpp14
-rw-r--r--include/mbgl/layermanager/fill_layer_factory.hpp14
-rw-r--r--include/mbgl/layermanager/heatmap_layer_factory.hpp14
-rw-r--r--include/mbgl/layermanager/hillshade_layer_factory.hpp14
-rw-r--r--include/mbgl/layermanager/line_layer_factory.hpp14
-rw-r--r--include/mbgl/layermanager/raster_layer_factory.hpp14
-rw-r--r--include/mbgl/layermanager/symbol_layer_factory.hpp14
-rw-r--r--include/mbgl/style/layers/background_layer.hpp9
-rw-r--r--include/mbgl/style/layers/circle_layer.hpp9
-rw-r--r--include/mbgl/style/layers/custom_layer.hpp9
-rw-r--r--include/mbgl/style/layers/fill_extrusion_layer.hpp9
-rw-r--r--include/mbgl/style/layers/fill_layer.hpp9
-rw-r--r--include/mbgl/style/layers/heatmap_layer.hpp9
-rw-r--r--include/mbgl/style/layers/hillshade_layer.hpp9
-rw-r--r--include/mbgl/style/layers/layer.hpp.ejs9
-rw-r--r--include/mbgl/style/layers/line_layer.hpp9
-rw-r--r--include/mbgl/style/layers/raster_layer.hpp9
-rw-r--r--include/mbgl/style/layers/symbol_layer.hpp9
-rw-r--r--platform/android/src/style/layers/background_layer.hpp1
-rw-r--r--platform/android/src/style/layers/circle_layer.hpp1
-rw-r--r--platform/android/src/style/layers/custom_layer.hpp1
-rw-r--r--platform/android/src/style/layers/fill_extrusion_layer.hpp1
-rw-r--r--platform/android/src/style/layers/fill_layer.hpp1
-rw-r--r--platform/android/src/style/layers/heatmap_layer.hpp1
-rw-r--r--platform/android/src/style/layers/hillshade_layer.hpp1
-rw-r--r--platform/android/src/style/layers/layer.hpp.ejs1
-rw-r--r--platform/android/src/style/layers/line_layer.hpp1
-rw-r--r--platform/android/src/style/layers/raster_layer.hpp1
-rw-r--r--platform/android/src/style/layers/symbol_layer.hpp1
-rw-r--r--platform/darwin/src/MGLBackgroundStyleLayer.mm1
-rw-r--r--platform/darwin/src/MGLBackgroundStyleLayer_Private.h2
-rw-r--r--platform/darwin/src/MGLCircleStyleLayer.mm1
-rw-r--r--platform/darwin/src/MGLCircleStyleLayer_Private.h2
-rw-r--r--platform/darwin/src/MGLFillExtrusionStyleLayer.mm1
-rw-r--r--platform/darwin/src/MGLFillExtrusionStyleLayer_Private.h2
-rw-r--r--platform/darwin/src/MGLFillStyleLayer.mm1
-rw-r--r--platform/darwin/src/MGLFillStyleLayer_Private.h2
-rw-r--r--platform/darwin/src/MGLHeatmapStyleLayer.mm1
-rw-r--r--platform/darwin/src/MGLHeatmapStyleLayer_Private.h2
-rw-r--r--platform/darwin/src/MGLHillshadeStyleLayer.mm1
-rw-r--r--platform/darwin/src/MGLHillshadeStyleLayer_Private.h2
-rw-r--r--platform/darwin/src/MGLLineStyleLayer.mm1
-rw-r--r--platform/darwin/src/MGLLineStyleLayer_Private.h2
-rw-r--r--platform/darwin/src/MGLOpenGLStyleLayer_Private.h2
-rw-r--r--platform/darwin/src/MGLRasterStyleLayer.mm1
-rw-r--r--platform/darwin/src/MGLRasterStyleLayer_Private.h2
-rw-r--r--platform/darwin/src/MGLStyleLayer.mm.ejs1
-rw-r--r--platform/darwin/src/MGLStyleLayer_Private.h.ejs2
-rw-r--r--platform/darwin/src/MGLSymbolStyleLayer.mm1
-rw-r--r--platform/darwin/src/MGLSymbolStyleLayer_Private.h2
-rw-r--r--platform/default/layer_manager.cpp21
-rw-r--r--src/mbgl/layermanager/background_layer_factory.cpp23
-rw-r--r--src/mbgl/layermanager/circle_layer_factory.cpp31
-rw-r--r--src/mbgl/layermanager/custom_layer_factory.cpp22
-rw-r--r--src/mbgl/layermanager/fill_extrusion_layer_factory.cpp31
-rw-r--r--src/mbgl/layermanager/fill_layer_factory.cpp31
-rw-r--r--src/mbgl/layermanager/heatmap_layer_factory.cpp31
-rw-r--r--src/mbgl/layermanager/hillshade_layer_factory.cpp28
-rw-r--r--src/mbgl/layermanager/line_layer_factory.cpp31
-rw-r--r--src/mbgl/layermanager/raster_layer_factory.cpp28
-rw-r--r--src/mbgl/layermanager/symbol_layer_factory.cpp31
-rw-r--r--src/mbgl/style/layers/background_layer.cpp17
-rw-r--r--src/mbgl/style/layers/circle_layer.cpp25
-rw-r--r--src/mbgl/style/layers/custom_layer.cpp14
-rw-r--r--src/mbgl/style/layers/fill_extrusion_layer.cpp25
-rw-r--r--src/mbgl/style/layers/fill_layer.cpp25
-rw-r--r--src/mbgl/style/layers/heatmap_layer.cpp25
-rw-r--r--src/mbgl/style/layers/hillshade_layer.cpp22
-rw-r--r--src/mbgl/style/layers/layer.cpp.ejs32
-rw-r--r--src/mbgl/style/layers/line_layer.cpp25
-rw-r--r--src/mbgl/style/layers/raster_layer.cpp22
-rw-r--r--src/mbgl/style/layers/symbol_layer.cpp25
76 files changed, 493 insertions, 377 deletions
diff --git a/cmake/core-files.txt b/cmake/core-files.txt
index bccdc27066..5712db9f15 100644
--- a/cmake/core-files.txt
+++ b/cmake/core-files.txt
@@ -95,10 +95,30 @@ src/mbgl/gl/vertex_array_extension.hpp
src/mbgl/gl/vertex_buffer.hpp
# layermanager
+include/mbgl/layermanager/background_layer_factory.hpp
+include/mbgl/layermanager/circle_layer_factory.hpp
+include/mbgl/layermanager/custom_layer_factory.hpp
+include/mbgl/layermanager/fill_extrusion_layer_factory.hpp
+include/mbgl/layermanager/fill_layer_factory.hpp
+include/mbgl/layermanager/heatmap_layer_factory.hpp
+include/mbgl/layermanager/hillshade_layer_factory.hpp
include/mbgl/layermanager/layer_factory.hpp
include/mbgl/layermanager/layer_manager.hpp
+include/mbgl/layermanager/line_layer_factory.hpp
+include/mbgl/layermanager/raster_layer_factory.hpp
+include/mbgl/layermanager/symbol_layer_factory.hpp
+src/mbgl/layermanager/background_layer_factory.cpp
+src/mbgl/layermanager/circle_layer_factory.cpp
+src/mbgl/layermanager/custom_layer_factory.cpp
+src/mbgl/layermanager/fill_extrusion_layer_factory.cpp
+src/mbgl/layermanager/fill_layer_factory.cpp
+src/mbgl/layermanager/heatmap_layer_factory.cpp
+src/mbgl/layermanager/hillshade_layer_factory.cpp
src/mbgl/layermanager/layer_factory.cpp
src/mbgl/layermanager/layer_manager.cpp
+src/mbgl/layermanager/line_layer_factory.cpp
+src/mbgl/layermanager/raster_layer_factory.cpp
+src/mbgl/layermanager/symbol_layer_factory.cpp
# layout
src/mbgl/layout/clip_lines.cpp
diff --git a/include/mbgl/layermanager/background_layer_factory.hpp b/include/mbgl/layermanager/background_layer_factory.hpp
new file mode 100644
index 0000000000..f2fa2f7a56
--- /dev/null
+++ b/include/mbgl/layermanager/background_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class BackgroundLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/circle_layer_factory.hpp b/include/mbgl/layermanager/circle_layer_factory.hpp
new file mode 100644
index 0000000000..b632d892f4
--- /dev/null
+++ b/include/mbgl/layermanager/circle_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class CircleLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/custom_layer_factory.hpp b/include/mbgl/layermanager/custom_layer_factory.hpp
new file mode 100644
index 0000000000..963a3dc2fd
--- /dev/null
+++ b/include/mbgl/layermanager/custom_layer_factory.hpp
@@ -0,0 +1,17 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+#include <mbgl/style/layer.hpp>
+
+#include <array>
+
+namespace mbgl {
+
+class CustomLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/fill_extrusion_layer_factory.hpp b/include/mbgl/layermanager/fill_extrusion_layer_factory.hpp
new file mode 100644
index 0000000000..c524f61950
--- /dev/null
+++ b/include/mbgl/layermanager/fill_extrusion_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class FillExtrusionLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/fill_layer_factory.hpp b/include/mbgl/layermanager/fill_layer_factory.hpp
new file mode 100644
index 0000000000..eec7d0e7a0
--- /dev/null
+++ b/include/mbgl/layermanager/fill_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class FillLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/heatmap_layer_factory.hpp b/include/mbgl/layermanager/heatmap_layer_factory.hpp
new file mode 100644
index 0000000000..b375dc9eb0
--- /dev/null
+++ b/include/mbgl/layermanager/heatmap_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class HeatmapLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/hillshade_layer_factory.hpp b/include/mbgl/layermanager/hillshade_layer_factory.hpp
new file mode 100644
index 0000000000..25b4f6c2c4
--- /dev/null
+++ b/include/mbgl/layermanager/hillshade_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class HillshadeLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/line_layer_factory.hpp b/include/mbgl/layermanager/line_layer_factory.hpp
new file mode 100644
index 0000000000..8aa7e5105b
--- /dev/null
+++ b/include/mbgl/layermanager/line_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class LineLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/raster_layer_factory.hpp b/include/mbgl/layermanager/raster_layer_factory.hpp
new file mode 100644
index 0000000000..d82137ee81
--- /dev/null
+++ b/include/mbgl/layermanager/raster_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class RasterLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/layermanager/symbol_layer_factory.hpp b/include/mbgl/layermanager/symbol_layer_factory.hpp
new file mode 100644
index 0000000000..c10b100af6
--- /dev/null
+++ b/include/mbgl/layermanager/symbol_layer_factory.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <mbgl/layermanager/layer_factory.hpp>
+
+namespace mbgl {
+
+class SymbolLayerFactory : public LayerFactory {
+protected:
+ const style::LayerTypeInfo* getTypeInfo() const noexcept final;
+ std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
+ std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+};
+
+} // namespace mbgl
diff --git a/include/mbgl/style/layers/background_layer.hpp b/include/mbgl/style/layers/background_layer.hpp
index e501954620..f0efa7acba 100644
--- a/include/mbgl/style/layers/background_layer.hpp
+++ b/include/mbgl/style/layers/background_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
#include <mbgl/style/property_value.hpp>
@@ -57,12 +56,4 @@ protected:
};
} // namespace style
-
-class BackgroundLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/circle_layer.hpp b/include/mbgl/style/layers/circle_layer.hpp
index 6d8969e834..08ec686ff2 100644
--- a/include/mbgl/style/layers/circle_layer.hpp
+++ b/include/mbgl/style/layers/circle_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
#include <mbgl/style/property_value.hpp>
@@ -105,12 +104,4 @@ protected:
};
} // namespace style
-
-class CircleLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/custom_layer.hpp b/include/mbgl/style/layers/custom_layer.hpp
index 27c16fbbc5..4ae59dfae3 100644
--- a/include/mbgl/style/layers/custom_layer.hpp
+++ b/include/mbgl/style/layers/custom_layer.hpp
@@ -1,6 +1,5 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/layer.hpp>
#include <array>
@@ -87,12 +86,4 @@ public:
};
} // namespace style
-
-class CustomLayerFactory : public LayerFactory {
- // LayerFactory overrides.
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/fill_extrusion_layer.hpp b/include/mbgl/style/layers/fill_extrusion_layer.hpp
index fd0888c1eb..c4b7ecfcdb 100644
--- a/include/mbgl/style/layers/fill_extrusion_layer.hpp
+++ b/include/mbgl/style/layers/fill_extrusion_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
#include <mbgl/style/property_value.hpp>
@@ -87,12 +86,4 @@ protected:
};
} // namespace style
-
-class FillExtrusionLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/fill_layer.hpp b/include/mbgl/style/layers/fill_layer.hpp
index 6c235b6ab7..6a402f28f7 100644
--- a/include/mbgl/style/layers/fill_layer.hpp
+++ b/include/mbgl/style/layers/fill_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
#include <mbgl/style/property_value.hpp>
@@ -81,12 +80,4 @@ protected:
};
} // namespace style
-
-class FillLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/heatmap_layer.hpp b/include/mbgl/style/layers/heatmap_layer.hpp
index 6ff377cf8f..4c3ae0daf8 100644
--- a/include/mbgl/style/layers/heatmap_layer.hpp
+++ b/include/mbgl/style/layers/heatmap_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/color_ramp_property_value.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
@@ -70,12 +69,4 @@ protected:
};
} // namespace style
-
-class HeatmapLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/hillshade_layer.hpp b/include/mbgl/style/layers/hillshade_layer.hpp
index 0c1843af75..760e70aa75 100644
--- a/include/mbgl/style/layers/hillshade_layer.hpp
+++ b/include/mbgl/style/layers/hillshade_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
#include <mbgl/style/property_value.hpp>
@@ -75,12 +74,4 @@ protected:
};
} // namespace style
-
-class HillshadeLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/layer.hpp.ejs b/include/mbgl/style/layers/layer.hpp.ejs
index e4c9d69dbf..a7a8ff35c5 100644
--- a/include/mbgl/style/layers/layer.hpp.ejs
+++ b/include/mbgl/style/layers/layer.hpp.ejs
@@ -7,7 +7,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
<% if (type === 'heatmap' || type === 'line') { -%>
#include <mbgl/style/color_ramp_property_value.hpp>
<% } -%>
@@ -73,12 +72,4 @@ protected:
};
} // namespace style
-
-class <%- camelize(type) %>LayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/line_layer.hpp b/include/mbgl/style/layers/line_layer.hpp
index 083bac6b9c..5993ac8730 100644
--- a/include/mbgl/style/layers/line_layer.hpp
+++ b/include/mbgl/style/layers/line_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/color_ramp_property_value.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
@@ -126,12 +125,4 @@ protected:
};
} // namespace style
-
-class LineLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/raster_layer.hpp b/include/mbgl/style/layers/raster_layer.hpp
index ef84ee569a..f4736c9dcd 100644
--- a/include/mbgl/style/layers/raster_layer.hpp
+++ b/include/mbgl/style/layers/raster_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
#include <mbgl/style/property_value.hpp>
@@ -87,12 +86,4 @@ protected:
};
} // namespace style
-
-class RasterLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/include/mbgl/style/layers/symbol_layer.hpp b/include/mbgl/style/layers/symbol_layer.hpp
index 3d23120559..764f1585f6 100644
--- a/include/mbgl/style/layers/symbol_layer.hpp
+++ b/include/mbgl/style/layers/symbol_layer.hpp
@@ -2,7 +2,6 @@
#pragma once
-#include <mbgl/layermanager/layer_factory.hpp>
#include <mbgl/style/layer.hpp>
#include <mbgl/style/filter.hpp>
#include <mbgl/style/property_value.hpp>
@@ -275,12 +274,4 @@ protected:
};
} // namespace style
-
-class SymbolLayerFactory : public LayerFactory {
-protected:
- const style::LayerTypeInfo* getTypeInfo() const noexcept final;
- std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
- std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
-};
-
} // namespace mbgl
diff --git a/platform/android/src/style/layers/background_layer.hpp b/platform/android/src/style/layers/background_layer.hpp
index c1b25b41bd..654031c6f4 100644
--- a/platform/android/src/style/layers/background_layer.hpp
+++ b/platform/android/src/style/layers/background_layer.hpp
@@ -4,6 +4,7 @@
#include "layer.hpp"
#include "../transition_options.hpp"
+#include <mbgl/layermanager/background_layer_factory.hpp>
#include <mbgl/style/layers/background_layer.hpp>
#include <jni/jni.hpp>
diff --git a/platform/android/src/style/layers/circle_layer.hpp b/platform/android/src/style/layers/circle_layer.hpp
index 6db97127c0..191b3924ff 100644
--- a/platform/android/src/style/layers/circle_layer.hpp
+++ b/platform/android/src/style/layers/circle_layer.hpp
@@ -4,6 +4,7 @@
#include "layer.hpp"
#include "../transition_options.hpp"
+#include <mbgl/layermanager/circle_layer_factory.hpp>
#include <mbgl/style/layers/circle_layer.hpp>
#include <jni/jni.hpp>
diff --git a/platform/android/src/style/layers/custom_layer.hpp b/platform/android/src/style/layers/custom_layer.hpp
index 814cfea3ca..0d6f4a408d 100644
--- a/platform/android/src/style/layers/custom_layer.hpp
+++ b/platform/android/src/style/layers/custom_layer.hpp
@@ -1,6 +1,7 @@
#pragma once
#include "layer.hpp"
+#include <mbgl/layermanager/custom_layer_factory.hpp>
#include <mbgl/style/layers/custom_layer.hpp>
#include <jni/jni.hpp>
diff --git a/platform/android/src/style/layers/fill_extrusion_layer.hpp b/platform/android/src/style/layers/fill_extrusion_layer.hpp
index 2d41a189a9..15dad67b01 100644
--- a/platform/android/src/style/layers/fill_extrusion_layer.hpp
+++ b/platform/android/src/style/layers/fill_extrusion_layer.hpp
@@ -4,6 +4,7 @@
#include "layer.hpp"
#include "../transition_options.hpp"
+#include <mbgl/layermanager/fill_extrusion_layer_factory.hpp>
#include <mbgl/style/layers/fill_extrusion_layer.hpp>
#include <jni/jni.hpp>
diff --git a/platform/android/src/style/layers/fill_layer.hpp b/platform/android/src/style/layers/fill_layer.hpp
index 776f2c3a88..b021ddca14 100644
--- a/platform/android/src/style/layers/fill_layer.hpp
+++ b/platform/android/src/style/layers/fill_layer.hpp
@@ -4,6 +4,7 @@
#include "layer.hpp"
#include "../transition_options.hpp"
+#include <mbgl/layermanager/fill_layer_factory.hpp>
#include <mbgl/style/layers/fill_layer.hpp>
#include <jni/jni.hpp>
diff --git a/platform/android/src/style/layers/heatmap_layer.hpp b/platform/android/src/style/layers/heatmap_layer.hpp
index 51966ec93e..9e3db0c89a 100644
--- a/platform/android/src/style/layers/heatmap_layer.hpp
+++ b/platform/android/src/style/layers/heatmap_layer.hpp
@@ -4,6 +4,7 @@
#include "layer.hpp"
#include "../transition_options.hpp"
+#include <mbgl/layermanager/heatmap_layer_factory.hpp>
#include <mbgl/style/layers/heatmap_layer.hpp>
#include <jni/jni.hpp>
diff --git a/platform/android/src/style/layers/hillshade_layer.hpp b/platform/android/src/style/layers/hillshade_layer.hpp
index b63f85e36c..2f4ea30c22 100644
--- a/platform/android/src/style/layers/hillshade_layer.hpp
+++ b/platform/android/src/style/layers/hillshade_layer.hpp
@@ -4,6 +4,7 @@
#include "layer.hpp"
#include "../transition_options.hpp"
+#include <mbgl/layermanager/hillshade_layer_factory.hpp>
#include <mbgl/style/layers/hillshade_layer.hpp>
#include <jni/jni.hpp>
diff --git a/platform/android/src/style/layers/layer.hpp.ejs b/platform/android/src/style/layers/layer.hpp.ejs
index e82470e270..28e00b2731 100644
--- a/platform/android/src/style/layers/layer.hpp.ejs
+++ b/platform/android/src/style/layers/layer.hpp.ejs
@@ -8,6 +8,7 @@
#include "layer.hpp"
#include "../transition_options.hpp"
+#include <mbgl/layermanager/<%- type.replace('-', '_') %>_layer_factory.hpp>
#include <mbgl/style/layers/<%- type.replace('-', '_') %>_layer.hpp>
#include <jni/jni.hpp>
diff --git a/platform/android/src/style/layers/line_layer.hpp b/platform/android/src/style/layers/line_layer.hpp
index 7c16822ef8..75a367ab70 100644
--- a/platform/android/src/style/layers/line_layer.hpp
+++ b/platform/android/src/style/layers/line_layer.hpp
@@ -4,6 +4,7 @@
#include "layer.hpp"
#include "../transition_options.hpp"
+#include <mbgl/layermanager/line_layer_factory.hpp>
#include <mbgl/style/layers/line_layer.hpp>
#include <jni/jni.hpp>
diff --git a/platform/android/src/style/layers/raster_layer.hpp b/platform/android/src/style/layers/raster_layer.hpp
index 6be6792776..53bee85e2b 100644
--- a/platform/android/src/style/layers/raster_layer.hpp
+++ b/platform/android/src/style/layers/raster_layer.hpp
@@ -4,6 +4,7 @@
#include "layer.hpp"
#include "../transition_options.hpp"
+#include <mbgl/layermanager/raster_layer_factory.hpp>
#include <mbgl/style/layers/raster_layer.hpp>
#include <jni/jni.hpp>
diff --git a/platform/android/src/style/layers/symbol_layer.hpp b/platform/android/src/style/layers/symbol_layer.hpp
index b38a659b06..f52597ef6f 100644
--- a/platform/android/src/style/layers/symbol_layer.hpp
+++ b/platform/android/src/style/layers/symbol_layer.hpp
@@ -4,6 +4,7 @@
#include "layer.hpp"
#include "../transition_options.hpp"
+#include <mbgl/layermanager/symbol_layer_factory.hpp>
#include <mbgl/style/layers/symbol_layer.hpp>
#include <jni/jni.hpp>
diff --git a/platform/darwin/src/MGLBackgroundStyleLayer.mm b/platform/darwin/src/MGLBackgroundStyleLayer.mm
index 5ddfff5534..c754de43c2 100644
--- a/platform/darwin/src/MGLBackgroundStyleLayer.mm
+++ b/platform/darwin/src/MGLBackgroundStyleLayer.mm
@@ -10,6 +10,7 @@
#import "MGLLoggingConfiguration_Private.h"
#import "MGLBackgroundStyleLayer_Private.h"
+#include <mbgl/style/layers/background_layer.hpp>
#include <mbgl/style/transition_options.hpp>
diff --git a/platform/darwin/src/MGLBackgroundStyleLayer_Private.h b/platform/darwin/src/MGLBackgroundStyleLayer_Private.h
index a6295a7c5a..b50a681b41 100644
--- a/platform/darwin/src/MGLBackgroundStyleLayer_Private.h
+++ b/platform/darwin/src/MGLBackgroundStyleLayer_Private.h
@@ -4,7 +4,7 @@
#include "MGLStyleLayer_Private.h"
-#include <mbgl/style/layers/background_layer.hpp>
+#include <mbgl/layermanager/background_layer_factory.hpp>
namespace mbgl {
diff --git a/platform/darwin/src/MGLCircleStyleLayer.mm b/platform/darwin/src/MGLCircleStyleLayer.mm
index 0562414b05..83113d6027 100644
--- a/platform/darwin/src/MGLCircleStyleLayer.mm
+++ b/platform/darwin/src/MGLCircleStyleLayer.mm
@@ -10,6 +10,7 @@
#import "MGLLoggingConfiguration_Private.h"
#import "MGLCircleStyleLayer_Private.h"
+#include <mbgl/style/layers/circle_layer.hpp>
#include <mbgl/style/transition_options.hpp>
diff --git a/platform/darwin/src/MGLCircleStyleLayer_Private.h b/platform/darwin/src/MGLCircleStyleLayer_Private.h
index a023e2a88b..788de6274f 100644
--- a/platform/darwin/src/MGLCircleStyleLayer_Private.h
+++ b/platform/darwin/src/MGLCircleStyleLayer_Private.h
@@ -4,7 +4,7 @@
#include "MGLStyleLayer_Private.h"
-#include <mbgl/style/layers/circle_layer.hpp>
+#include <mbgl/layermanager/circle_layer_factory.hpp>
namespace mbgl {
diff --git a/platform/darwin/src/MGLFillExtrusionStyleLayer.mm b/platform/darwin/src/MGLFillExtrusionStyleLayer.mm
index e4e9c707ea..8ec6000eae 100644
--- a/platform/darwin/src/MGLFillExtrusionStyleLayer.mm
+++ b/platform/darwin/src/MGLFillExtrusionStyleLayer.mm
@@ -10,6 +10,7 @@
#import "MGLLoggingConfiguration_Private.h"
#import "MGLFillExtrusionStyleLayer_Private.h"
+#include <mbgl/style/layers/fill_extrusion_layer.hpp>
#include <mbgl/style/transition_options.hpp>
diff --git a/platform/darwin/src/MGLFillExtrusionStyleLayer_Private.h b/platform/darwin/src/MGLFillExtrusionStyleLayer_Private.h
index fdd99d74f4..2525b044af 100644
--- a/platform/darwin/src/MGLFillExtrusionStyleLayer_Private.h
+++ b/platform/darwin/src/MGLFillExtrusionStyleLayer_Private.h
@@ -4,7 +4,7 @@
#include "MGLStyleLayer_Private.h"
-#include <mbgl/style/layers/fill_extrusion_layer.hpp>
+#include <mbgl/layermanager/fill_extrusion_layer_factory.hpp>
namespace mbgl {
diff --git a/platform/darwin/src/MGLFillStyleLayer.mm b/platform/darwin/src/MGLFillStyleLayer.mm
index f5dc62cd5b..69de3e7d62 100644
--- a/platform/darwin/src/MGLFillStyleLayer.mm
+++ b/platform/darwin/src/MGLFillStyleLayer.mm
@@ -10,6 +10,7 @@
#import "MGLLoggingConfiguration_Private.h"
#import "MGLFillStyleLayer_Private.h"
+#include <mbgl/style/layers/fill_layer.hpp>
#include <mbgl/style/transition_options.hpp>
diff --git a/platform/darwin/src/MGLFillStyleLayer_Private.h b/platform/darwin/src/MGLFillStyleLayer_Private.h
index 28f24f056d..01f8b16f32 100644
--- a/platform/darwin/src/MGLFillStyleLayer_Private.h
+++ b/platform/darwin/src/MGLFillStyleLayer_Private.h
@@ -4,7 +4,7 @@
#include "MGLStyleLayer_Private.h"
-#include <mbgl/style/layers/fill_layer.hpp>
+#include <mbgl/layermanager/fill_layer_factory.hpp>
namespace mbgl {
diff --git a/platform/darwin/src/MGLHeatmapStyleLayer.mm b/platform/darwin/src/MGLHeatmapStyleLayer.mm
index a3816c0fdd..ec6fdbde78 100644
--- a/platform/darwin/src/MGLHeatmapStyleLayer.mm
+++ b/platform/darwin/src/MGLHeatmapStyleLayer.mm
@@ -10,6 +10,7 @@
#import "MGLLoggingConfiguration_Private.h"
#import "MGLHeatmapStyleLayer_Private.h"
+#include <mbgl/style/layers/heatmap_layer.hpp>
#include <mbgl/style/transition_options.hpp>
diff --git a/platform/darwin/src/MGLHeatmapStyleLayer_Private.h b/platform/darwin/src/MGLHeatmapStyleLayer_Private.h
index e81920ae39..407036cedf 100644
--- a/platform/darwin/src/MGLHeatmapStyleLayer_Private.h
+++ b/platform/darwin/src/MGLHeatmapStyleLayer_Private.h
@@ -4,7 +4,7 @@
#include "MGLStyleLayer_Private.h"
-#include <mbgl/style/layers/heatmap_layer.hpp>
+#include <mbgl/layermanager/heatmap_layer_factory.hpp>
namespace mbgl {
diff --git a/platform/darwin/src/MGLHillshadeStyleLayer.mm b/platform/darwin/src/MGLHillshadeStyleLayer.mm
index c1f47b0b68..95620b139d 100644
--- a/platform/darwin/src/MGLHillshadeStyleLayer.mm
+++ b/platform/darwin/src/MGLHillshadeStyleLayer.mm
@@ -10,6 +10,7 @@
#import "MGLLoggingConfiguration_Private.h"
#import "MGLHillshadeStyleLayer_Private.h"
+#include <mbgl/style/layers/hillshade_layer.hpp>
#include <mbgl/style/transition_options.hpp>
diff --git a/platform/darwin/src/MGLHillshadeStyleLayer_Private.h b/platform/darwin/src/MGLHillshadeStyleLayer_Private.h
index e92cc7f3ec..4c427f2137 100644
--- a/platform/darwin/src/MGLHillshadeStyleLayer_Private.h
+++ b/platform/darwin/src/MGLHillshadeStyleLayer_Private.h
@@ -4,7 +4,7 @@
#include "MGLStyleLayer_Private.h"
-#include <mbgl/style/layers/hillshade_layer.hpp>
+#include <mbgl/layermanager/hillshade_layer_factory.hpp>
namespace mbgl {
diff --git a/platform/darwin/src/MGLLineStyleLayer.mm b/platform/darwin/src/MGLLineStyleLayer.mm
index 8fdd9a0bcc..f227ed0bb7 100644
--- a/platform/darwin/src/MGLLineStyleLayer.mm
+++ b/platform/darwin/src/MGLLineStyleLayer.mm
@@ -10,6 +10,7 @@
#import "MGLLoggingConfiguration_Private.h"
#import "MGLLineStyleLayer_Private.h"
+#include <mbgl/style/layers/line_layer.hpp>
#include <mbgl/style/transition_options.hpp>
diff --git a/platform/darwin/src/MGLLineStyleLayer_Private.h b/platform/darwin/src/MGLLineStyleLayer_Private.h
index 85dbffb8ca..b4c7b3ee7c 100644
--- a/platform/darwin/src/MGLLineStyleLayer_Private.h
+++ b/platform/darwin/src/MGLLineStyleLayer_Private.h
@@ -4,7 +4,7 @@
#include "MGLStyleLayer_Private.h"
-#include <mbgl/style/layers/line_layer.hpp>
+#include <mbgl/layermanager/line_layer_factory.hpp>
namespace mbgl {
diff --git a/platform/darwin/src/MGLOpenGLStyleLayer_Private.h b/platform/darwin/src/MGLOpenGLStyleLayer_Private.h
index cce062b53d..27a536c60c 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/style/layers/custom_layer.hpp>
+#include <mbgl/layermanager/custom_layer_factory.hpp>
namespace mbgl {
diff --git a/platform/darwin/src/MGLRasterStyleLayer.mm b/platform/darwin/src/MGLRasterStyleLayer.mm
index bcaffe1c4a..cf1b8da84e 100644
--- a/platform/darwin/src/MGLRasterStyleLayer.mm
+++ b/platform/darwin/src/MGLRasterStyleLayer.mm
@@ -10,6 +10,7 @@
#import "MGLLoggingConfiguration_Private.h"
#import "MGLRasterStyleLayer_Private.h"
+#include <mbgl/style/layers/raster_layer.hpp>
#include <mbgl/style/transition_options.hpp>
diff --git a/platform/darwin/src/MGLRasterStyleLayer_Private.h b/platform/darwin/src/MGLRasterStyleLayer_Private.h
index 5388d64302..7b123ed888 100644
--- a/platform/darwin/src/MGLRasterStyleLayer_Private.h
+++ b/platform/darwin/src/MGLRasterStyleLayer_Private.h
@@ -4,7 +4,7 @@
#include "MGLStyleLayer_Private.h"
-#include <mbgl/style/layers/raster_layer.hpp>
+#include <mbgl/layermanager/raster_layer_factory.hpp>
namespace mbgl {
diff --git a/platform/darwin/src/MGLStyleLayer.mm.ejs b/platform/darwin/src/MGLStyleLayer.mm.ejs
index 0cccd16a40..c744db72ed 100644
--- a/platform/darwin/src/MGLStyleLayer.mm.ejs
+++ b/platform/darwin/src/MGLStyleLayer.mm.ejs
@@ -16,6 +16,7 @@
#import "MGLLoggingConfiguration_Private.h"
#import "MGL<%- camelize(type) %>StyleLayer_Private.h"
+#include <mbgl/style/layers/<%- type.replace('-', '_') %>_layer.hpp>
#include <mbgl/style/transition_options.hpp>
<% if (enumProperties) { -%>
diff --git a/platform/darwin/src/MGLStyleLayer_Private.h.ejs b/platform/darwin/src/MGLStyleLayer_Private.h.ejs
index 8cb8d6281a..a6e6b9cd87 100644
--- a/platform/darwin/src/MGLStyleLayer_Private.h.ejs
+++ b/platform/darwin/src/MGLStyleLayer_Private.h.ejs
@@ -11,7 +11,7 @@
#include "MGLStyleLayer_Private.h"
-#include <mbgl/style/layers/<%- type.replace('-', '_') %>_layer.hpp>
+#include <mbgl/layermanager/<%- type.replace('-', '_') %>_layer_factory.hpp>
namespace mbgl {
diff --git a/platform/darwin/src/MGLSymbolStyleLayer.mm b/platform/darwin/src/MGLSymbolStyleLayer.mm
index 481570fdeb..5da74d8fac 100644
--- a/platform/darwin/src/MGLSymbolStyleLayer.mm
+++ b/platform/darwin/src/MGLSymbolStyleLayer.mm
@@ -10,6 +10,7 @@
#import "MGLLoggingConfiguration_Private.h"
#import "MGLSymbolStyleLayer_Private.h"
+#include <mbgl/style/layers/symbol_layer.hpp>
#include <mbgl/style/transition_options.hpp>
diff --git a/platform/darwin/src/MGLSymbolStyleLayer_Private.h b/platform/darwin/src/MGLSymbolStyleLayer_Private.h
index 5e5755ad67..4c3505a9d4 100644
--- a/platform/darwin/src/MGLSymbolStyleLayer_Private.h
+++ b/platform/darwin/src/MGLSymbolStyleLayer_Private.h
@@ -4,7 +4,7 @@
#include "MGLStyleLayer_Private.h"
-#include <mbgl/style/layers/symbol_layer.hpp>
+#include <mbgl/layermanager/symbol_layer_factory.hpp>
namespace mbgl {
diff --git a/platform/default/layer_manager.cpp b/platform/default/layer_manager.cpp
index 86343369b4..05d0f4d1ae 100644
--- a/platform/default/layer_manager.cpp
+++ b/platform/default/layer_manager.cpp
@@ -1,14 +1,15 @@
#include <mbgl/layermanager/layer_manager.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/heatmap_layer.hpp>
-#include <mbgl/style/layers/hillshade_layer.hpp>
-#include <mbgl/style/layers/line_layer.hpp>
-#include <mbgl/style/layers/raster_layer.hpp>
-#include <mbgl/style/layers/symbol_layer.hpp>
+
+#include <mbgl/layermanager/background_layer_factory.hpp>
+#include <mbgl/layermanager/circle_layer_factory.hpp>
+#include <mbgl/layermanager/custom_layer_factory.hpp>
+#include <mbgl/layermanager/fill_extrusion_layer_factory.hpp>
+#include <mbgl/layermanager/fill_layer_factory.hpp>
+#include <mbgl/layermanager/heatmap_layer_factory.hpp>
+#include <mbgl/layermanager/hillshade_layer_factory.hpp>
+#include <mbgl/layermanager/line_layer_factory.hpp>
+#include <mbgl/layermanager/raster_layer_factory.hpp>
+#include <mbgl/layermanager/symbol_layer_factory.hpp>
#include <map>
#include <memory>
diff --git a/src/mbgl/layermanager/background_layer_factory.cpp b/src/mbgl/layermanager/background_layer_factory.cpp
new file mode 100644
index 0000000000..0e27e10343
--- /dev/null
+++ b/src/mbgl/layermanager/background_layer_factory.cpp
@@ -0,0 +1,23 @@
+#include <mbgl/layermanager/background_layer_factory.hpp>
+
+#include <mbgl/renderer/layers/render_background_layer.hpp>
+#include <mbgl/style/layers/background_layer.hpp>
+#include <mbgl/style/layers/background_layer_impl.hpp>
+
+namespace mbgl {
+
+const style::LayerTypeInfo* BackgroundLayerFactory::getTypeInfo() const noexcept {
+ return style::BackgroundLayer::Impl::staticTypeInfo();
+}
+
+std::unique_ptr<style::Layer> BackgroundLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
+ (void)value;
+ return std::unique_ptr<style::Layer>(new style::BackgroundLayer(id));
+}
+
+std::unique_ptr<RenderLayer> BackgroundLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
+ assert(impl->getTypeInfo() == getTypeInfo());
+ return std::make_unique<RenderBackgroundLayer>(staticImmutableCast<style::BackgroundLayer::Impl>(std::move(impl)));
+}
+
+} // namespace mbgl
diff --git a/src/mbgl/layermanager/circle_layer_factory.cpp b/src/mbgl/layermanager/circle_layer_factory.cpp
new file mode 100644
index 0000000000..215f228aa2
--- /dev/null
+++ b/src/mbgl/layermanager/circle_layer_factory.cpp
@@ -0,0 +1,31 @@
+#include <mbgl/layermanager/circle_layer_factory.hpp>
+
+#include <mbgl/renderer/layers/render_circle_layer.hpp>
+#include <mbgl/style/layers/circle_layer.hpp>
+#include <mbgl/style/layers/circle_layer_impl.hpp>
+
+namespace mbgl {
+
+const style::LayerTypeInfo* CircleLayerFactory::getTypeInfo() const noexcept {
+ return style::CircleLayer::Impl::staticTypeInfo();
+}
+
+std::unique_ptr<style::Layer> CircleLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
+ optional<std::string> source = getSource(value);
+ if (!source) {
+ return nullptr;
+ }
+
+ std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::CircleLayer(id, *source));
+ if (!initSourceLayerAndFilter(layer.get(), value)) {
+ return nullptr;
+ }
+ return layer;
+}
+
+std::unique_ptr<RenderLayer> CircleLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
+ assert(impl->getTypeInfo() == getTypeInfo());
+ return std::make_unique<RenderCircleLayer>(staticImmutableCast<style::CircleLayer::Impl>(std::move(impl)));
+}
+
+} // namespace mbgl
diff --git a/src/mbgl/layermanager/custom_layer_factory.cpp b/src/mbgl/layermanager/custom_layer_factory.cpp
new file mode 100644
index 0000000000..31b1730fc9
--- /dev/null
+++ b/src/mbgl/layermanager/custom_layer_factory.cpp
@@ -0,0 +1,22 @@
+#include <mbgl/layermanager/custom_layer_factory.hpp>
+
+#include <mbgl/renderer/layers/render_custom_layer.hpp>
+#include <mbgl/style/layers/custom_layer.hpp>
+#include <mbgl/style/layers/custom_layer_impl.hpp>
+
+namespace mbgl {
+
+const style::LayerTypeInfo* CustomLayerFactory::getTypeInfo() const noexcept {
+ return style::CustomLayer::Impl::staticTypeInfo();
+}
+
+std::unique_ptr<style::Layer> CustomLayerFactory::createLayer(const std::string&, const style::conversion::Convertible&) noexcept {
+ assert(false);
+ return nullptr;
+}
+
+std::unique_ptr<RenderLayer> CustomLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
+ return std::make_unique<RenderCustomLayer>(staticImmutableCast<style::CustomLayer::Impl>(std::move(impl)));
+}
+
+} // namespace mbgl
diff --git a/src/mbgl/layermanager/fill_extrusion_layer_factory.cpp b/src/mbgl/layermanager/fill_extrusion_layer_factory.cpp
new file mode 100644
index 0000000000..8b90d950d0
--- /dev/null
+++ b/src/mbgl/layermanager/fill_extrusion_layer_factory.cpp
@@ -0,0 +1,31 @@
+#include <mbgl/layermanager/fill_extrusion_layer_factory.hpp>
+
+#include <mbgl/renderer/layers/render_fill_extrusion_layer.hpp>
+#include <mbgl/style/layers/fill_extrusion_layer.hpp>
+#include <mbgl/style/layers/fill_extrusion_layer_impl.hpp>
+
+namespace mbgl {
+
+const style::LayerTypeInfo* FillExtrusionLayerFactory::getTypeInfo() const noexcept {
+ return style::FillExtrusionLayer::Impl::staticTypeInfo();
+}
+
+std::unique_ptr<style::Layer> FillExtrusionLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
+ optional<std::string> source = getSource(value);
+ if (!source) {
+ return nullptr;
+ }
+
+ std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::FillExtrusionLayer(id, *source));
+ if (!initSourceLayerAndFilter(layer.get(), value)) {
+ return nullptr;
+ }
+ return layer;
+}
+
+std::unique_ptr<RenderLayer> FillExtrusionLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
+ assert(impl->getTypeInfo() == getTypeInfo());
+ return std::make_unique<RenderFillExtrusionLayer>(staticImmutableCast<style::FillExtrusionLayer::Impl>(std::move(impl)));
+}
+
+} // namespace mbgl
diff --git a/src/mbgl/layermanager/fill_layer_factory.cpp b/src/mbgl/layermanager/fill_layer_factory.cpp
new file mode 100644
index 0000000000..664788de17
--- /dev/null
+++ b/src/mbgl/layermanager/fill_layer_factory.cpp
@@ -0,0 +1,31 @@
+#include <mbgl/layermanager/fill_layer_factory.hpp>
+
+#include <mbgl/renderer/layers/render_fill_layer.hpp>
+#include <mbgl/style/layers/fill_layer.hpp>
+#include <mbgl/style/layers/fill_layer_impl.hpp>
+
+namespace mbgl {
+
+const style::LayerTypeInfo* FillLayerFactory::getTypeInfo() const noexcept {
+ return style::FillLayer::Impl::staticTypeInfo();
+}
+
+std::unique_ptr<style::Layer> FillLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
+ optional<std::string> source = getSource(value);
+ if (!source) {
+ return nullptr;
+ }
+
+ std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::FillLayer(id, *source));
+ if (!initSourceLayerAndFilter(layer.get(), value)) {
+ return nullptr;
+ }
+ return layer;
+}
+
+std::unique_ptr<RenderLayer> FillLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
+ assert(impl->getTypeInfo() == getTypeInfo());
+ return std::make_unique<RenderFillLayer>(staticImmutableCast<style::FillLayer::Impl>(std::move(impl)));
+}
+
+} // namespace mbgl
diff --git a/src/mbgl/layermanager/heatmap_layer_factory.cpp b/src/mbgl/layermanager/heatmap_layer_factory.cpp
new file mode 100644
index 0000000000..4785b7c010
--- /dev/null
+++ b/src/mbgl/layermanager/heatmap_layer_factory.cpp
@@ -0,0 +1,31 @@
+#include <mbgl/layermanager/heatmap_layer_factory.hpp>
+
+#include <mbgl/renderer/layers/render_heatmap_layer.hpp>
+#include <mbgl/style/layers/heatmap_layer.hpp>
+#include <mbgl/style/layers/heatmap_layer_impl.hpp>
+
+namespace mbgl {
+
+const style::LayerTypeInfo* HeatmapLayerFactory::getTypeInfo() const noexcept {
+ return style::HeatmapLayer::Impl::staticTypeInfo();
+}
+
+std::unique_ptr<style::Layer> HeatmapLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
+ optional<std::string> source = getSource(value);
+ if (!source) {
+ return nullptr;
+ }
+
+ std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::HeatmapLayer(id, *source));
+ if (!initSourceLayerAndFilter(layer.get(), value)) {
+ return nullptr;
+ }
+ return layer;
+}
+
+std::unique_ptr<RenderLayer> HeatmapLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
+ assert(impl->getTypeInfo() == getTypeInfo());
+ return std::make_unique<RenderHeatmapLayer>(staticImmutableCast<style::HeatmapLayer::Impl>(std::move(impl)));
+}
+
+} // namespace mbgl
diff --git a/src/mbgl/layermanager/hillshade_layer_factory.cpp b/src/mbgl/layermanager/hillshade_layer_factory.cpp
new file mode 100644
index 0000000000..9291af0711
--- /dev/null
+++ b/src/mbgl/layermanager/hillshade_layer_factory.cpp
@@ -0,0 +1,28 @@
+#include <mbgl/layermanager/hillshade_layer_factory.hpp>
+
+#include <mbgl/renderer/layers/render_hillshade_layer.hpp>
+#include <mbgl/style/layers/hillshade_layer.hpp>
+#include <mbgl/style/layers/hillshade_layer_impl.hpp>
+
+namespace mbgl {
+
+const style::LayerTypeInfo* HillshadeLayerFactory::getTypeInfo() const noexcept {
+ return style::HillshadeLayer::Impl::staticTypeInfo();
+}
+
+std::unique_ptr<style::Layer> HillshadeLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
+ optional<std::string> source = getSource(value);
+ if (!source) {
+ return nullptr;
+ }
+
+ std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::HillshadeLayer(id, *source));
+ return layer;
+}
+
+std::unique_ptr<RenderLayer> HillshadeLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
+ assert(impl->getTypeInfo() == getTypeInfo());
+ return std::make_unique<RenderHillshadeLayer>(staticImmutableCast<style::HillshadeLayer::Impl>(std::move(impl)));
+}
+
+} // namespace mbgl
diff --git a/src/mbgl/layermanager/line_layer_factory.cpp b/src/mbgl/layermanager/line_layer_factory.cpp
new file mode 100644
index 0000000000..7a8ea01d79
--- /dev/null
+++ b/src/mbgl/layermanager/line_layer_factory.cpp
@@ -0,0 +1,31 @@
+#include <mbgl/layermanager/line_layer_factory.hpp>
+
+#include <mbgl/renderer/layers/render_line_layer.hpp>
+#include <mbgl/style/layers/line_layer.hpp>
+#include <mbgl/style/layers/line_layer_impl.hpp>
+
+namespace mbgl {
+
+const style::LayerTypeInfo* LineLayerFactory::getTypeInfo() const noexcept {
+ return style::LineLayer::Impl::staticTypeInfo();
+}
+
+std::unique_ptr<style::Layer> LineLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
+ optional<std::string> source = getSource(value);
+ if (!source) {
+ return nullptr;
+ }
+
+ std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::LineLayer(id, *source));
+ if (!initSourceLayerAndFilter(layer.get(), value)) {
+ return nullptr;
+ }
+ return layer;
+}
+
+std::unique_ptr<RenderLayer> LineLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
+ assert(impl->getTypeInfo() == getTypeInfo());
+ return std::make_unique<RenderLineLayer>(staticImmutableCast<style::LineLayer::Impl>(std::move(impl)));
+}
+
+} // namespace mbgl
diff --git a/src/mbgl/layermanager/raster_layer_factory.cpp b/src/mbgl/layermanager/raster_layer_factory.cpp
new file mode 100644
index 0000000000..ac9205a140
--- /dev/null
+++ b/src/mbgl/layermanager/raster_layer_factory.cpp
@@ -0,0 +1,28 @@
+#include <mbgl/layermanager/raster_layer_factory.hpp>
+
+#include <mbgl/renderer/layers/render_raster_layer.hpp>
+#include <mbgl/style/layers/raster_layer.hpp>
+#include <mbgl/style/layers/raster_layer_impl.hpp>
+
+namespace mbgl {
+
+const style::LayerTypeInfo* RasterLayerFactory::getTypeInfo() const noexcept {
+ return style::RasterLayer::Impl::staticTypeInfo();
+}
+
+std::unique_ptr<style::Layer> RasterLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
+ optional<std::string> source = getSource(value);
+ if (!source) {
+ return nullptr;
+ }
+
+ std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::RasterLayer(id, *source));
+ return layer;
+}
+
+std::unique_ptr<RenderLayer> RasterLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
+ assert(impl->getTypeInfo() == getTypeInfo());
+ return std::make_unique<RenderRasterLayer>(staticImmutableCast<style::RasterLayer::Impl>(std::move(impl)));
+}
+
+} // namespace mbgl
diff --git a/src/mbgl/layermanager/symbol_layer_factory.cpp b/src/mbgl/layermanager/symbol_layer_factory.cpp
new file mode 100644
index 0000000000..8acefb9f41
--- /dev/null
+++ b/src/mbgl/layermanager/symbol_layer_factory.cpp
@@ -0,0 +1,31 @@
+#include <mbgl/layermanager/symbol_layer_factory.hpp>
+
+#include <mbgl/renderer/layers/render_symbol_layer.hpp>
+#include <mbgl/style/layers/symbol_layer.hpp>
+#include <mbgl/style/layers/symbol_layer_impl.hpp>
+
+namespace mbgl {
+
+const style::LayerTypeInfo* SymbolLayerFactory::getTypeInfo() const noexcept {
+ return style::SymbolLayer::Impl::staticTypeInfo();
+}
+
+std::unique_ptr<style::Layer> SymbolLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
+ optional<std::string> source = getSource(value);
+ if (!source) {
+ return nullptr;
+ }
+
+ std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::SymbolLayer(id, *source));
+ if (!initSourceLayerAndFilter(layer.get(), value)) {
+ return nullptr;
+ }
+ return layer;
+}
+
+std::unique_ptr<RenderLayer> SymbolLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
+ assert(impl->getTypeInfo() == getTypeInfo());
+ return std::make_unique<RenderSymbolLayer>(staticImmutableCast<style::SymbolLayer::Impl>(std::move(impl)));
+}
+
+} // namespace mbgl
diff --git a/src/mbgl/style/layers/background_layer.cpp b/src/mbgl/style/layers/background_layer.cpp
index 8beafb0278..eb3c7a2666 100644
--- a/src/mbgl/style/layers/background_layer.cpp
+++ b/src/mbgl/style/layers/background_layer.cpp
@@ -11,8 +11,6 @@
#include <mbgl/style/conversion_impl.hpp>
#include <mbgl/util/fnv_hash.hpp>
-#include <mbgl/renderer/layers/render_background_layer.hpp>
-
namespace mbgl {
namespace style {
@@ -287,19 +285,4 @@ Mutable<Layer::Impl> BackgroundLayer::mutableBaseImpl() const {
}
} // namespace style
-
-const style::LayerTypeInfo* BackgroundLayerFactory::getTypeInfo() const noexcept {
- return style::BackgroundLayer::Impl::staticTypeInfo();
-}
-
-std::unique_ptr<style::Layer> BackgroundLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
- (void)value;
- return std::unique_ptr<style::Layer>(new style::BackgroundLayer(id));
-}
-
-std::unique_ptr<RenderLayer> BackgroundLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
- assert(impl->getTypeInfo() == getTypeInfo());
- return std::make_unique<RenderBackgroundLayer>(staticImmutableCast<style::BackgroundLayer::Impl>(std::move(impl)));
-}
-
} // namespace mbgl
diff --git a/src/mbgl/style/layers/circle_layer.cpp b/src/mbgl/style/layers/circle_layer.cpp
index 1e6200e4d2..92327a57e0 100644
--- a/src/mbgl/style/layers/circle_layer.cpp
+++ b/src/mbgl/style/layers/circle_layer.cpp
@@ -11,8 +11,6 @@
#include <mbgl/style/conversion_impl.hpp>
#include <mbgl/util/fnv_hash.hpp>
-#include <mbgl/renderer/layers/render_circle_layer.hpp>
-
namespace mbgl {
namespace style {
@@ -704,27 +702,4 @@ Mutable<Layer::Impl> CircleLayer::mutableBaseImpl() const {
}
} // namespace style
-
-const style::LayerTypeInfo* CircleLayerFactory::getTypeInfo() const noexcept {
- return style::CircleLayer::Impl::staticTypeInfo();
-}
-
-std::unique_ptr<style::Layer> CircleLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
- optional<std::string> source = getSource(value);
- if (!source) {
- return nullptr;
- }
-
- std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::CircleLayer(id, *source));
- if (!initSourceLayerAndFilter(layer.get(), value)) {
- return nullptr;
- }
- return layer;
-}
-
-std::unique_ptr<RenderLayer> CircleLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
- assert(impl->getTypeInfo() == getTypeInfo());
- return std::make_unique<RenderCircleLayer>(staticImmutableCast<style::CircleLayer::Impl>(std::move(impl)));
-}
-
} // namespace mbgl
diff --git a/src/mbgl/style/layers/custom_layer.cpp b/src/mbgl/style/layers/custom_layer.cpp
index abea5d2d31..90c65193d5 100644
--- a/src/mbgl/style/layers/custom_layer.cpp
+++ b/src/mbgl/style/layers/custom_layer.cpp
@@ -56,18 +56,4 @@ const LayerTypeInfo* CustomLayer::Impl::staticTypeInfo() noexcept {
}
} // namespace style
-
-const style::LayerTypeInfo* CustomLayerFactory::getTypeInfo() const noexcept {
- return &style::typeInfoCustom;
-}
-
-std::unique_ptr<style::Layer> CustomLayerFactory::createLayer(const std::string&, const style::conversion::Convertible&) noexcept {
- assert(false);
- return nullptr;
-}
-
-std::unique_ptr<RenderLayer> CustomLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
- return std::make_unique<RenderCustomLayer>(staticImmutableCast<style::CustomLayer::Impl>(std::move(impl)));
-}
-
} // namespace mbgl
diff --git a/src/mbgl/style/layers/fill_extrusion_layer.cpp b/src/mbgl/style/layers/fill_extrusion_layer.cpp
index 12f566e00b..74fd4ad757 100644
--- a/src/mbgl/style/layers/fill_extrusion_layer.cpp
+++ b/src/mbgl/style/layers/fill_extrusion_layer.cpp
@@ -11,8 +11,6 @@
#include <mbgl/style/conversion_impl.hpp>
#include <mbgl/util/fnv_hash.hpp>
-#include <mbgl/renderer/layers/render_fill_extrusion_layer.hpp>
-
namespace mbgl {
namespace style {
@@ -562,27 +560,4 @@ Mutable<Layer::Impl> FillExtrusionLayer::mutableBaseImpl() const {
}
} // namespace style
-
-const style::LayerTypeInfo* FillExtrusionLayerFactory::getTypeInfo() const noexcept {
- return style::FillExtrusionLayer::Impl::staticTypeInfo();
-}
-
-std::unique_ptr<style::Layer> FillExtrusionLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
- optional<std::string> source = getSource(value);
- if (!source) {
- return nullptr;
- }
-
- std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::FillExtrusionLayer(id, *source));
- if (!initSourceLayerAndFilter(layer.get(), value)) {
- return nullptr;
- }
- return layer;
-}
-
-std::unique_ptr<RenderLayer> FillExtrusionLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
- assert(impl->getTypeInfo() == getTypeInfo());
- return std::make_unique<RenderFillExtrusionLayer>(staticImmutableCast<style::FillExtrusionLayer::Impl>(std::move(impl)));
-}
-
} // namespace mbgl
diff --git a/src/mbgl/style/layers/fill_layer.cpp b/src/mbgl/style/layers/fill_layer.cpp
index 480fc597dd..55b5d9c8cb 100644
--- a/src/mbgl/style/layers/fill_layer.cpp
+++ b/src/mbgl/style/layers/fill_layer.cpp
@@ -11,8 +11,6 @@
#include <mbgl/style/conversion_impl.hpp>
#include <mbgl/util/fnv_hash.hpp>
-#include <mbgl/renderer/layers/render_fill_layer.hpp>
-
namespace mbgl {
namespace style {
@@ -506,27 +504,4 @@ Mutable<Layer::Impl> FillLayer::mutableBaseImpl() const {
}
} // namespace style
-
-const style::LayerTypeInfo* FillLayerFactory::getTypeInfo() const noexcept {
- return style::FillLayer::Impl::staticTypeInfo();
-}
-
-std::unique_ptr<style::Layer> FillLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
- optional<std::string> source = getSource(value);
- if (!source) {
- return nullptr;
- }
-
- std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::FillLayer(id, *source));
- if (!initSourceLayerAndFilter(layer.get(), value)) {
- return nullptr;
- }
- return layer;
-}
-
-std::unique_ptr<RenderLayer> FillLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
- assert(impl->getTypeInfo() == getTypeInfo());
- return std::make_unique<RenderFillLayer>(staticImmutableCast<style::FillLayer::Impl>(std::move(impl)));
-}
-
} // namespace mbgl
diff --git a/src/mbgl/style/layers/heatmap_layer.cpp b/src/mbgl/style/layers/heatmap_layer.cpp
index 92477615b2..29c5fc5e4e 100644
--- a/src/mbgl/style/layers/heatmap_layer.cpp
+++ b/src/mbgl/style/layers/heatmap_layer.cpp
@@ -11,8 +11,6 @@
#include <mbgl/style/conversion_impl.hpp>
#include <mbgl/util/fnv_hash.hpp>
-#include <mbgl/renderer/layers/render_heatmap_layer.hpp>
-
namespace mbgl {
namespace style {
@@ -391,27 +389,4 @@ Mutable<Layer::Impl> HeatmapLayer::mutableBaseImpl() const {
}
} // namespace style
-
-const style::LayerTypeInfo* HeatmapLayerFactory::getTypeInfo() const noexcept {
- return style::HeatmapLayer::Impl::staticTypeInfo();
-}
-
-std::unique_ptr<style::Layer> HeatmapLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
- optional<std::string> source = getSource(value);
- if (!source) {
- return nullptr;
- }
-
- std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::HeatmapLayer(id, *source));
- if (!initSourceLayerAndFilter(layer.get(), value)) {
- return nullptr;
- }
- return layer;
-}
-
-std::unique_ptr<RenderLayer> HeatmapLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
- assert(impl->getTypeInfo() == getTypeInfo());
- return std::make_unique<RenderHeatmapLayer>(staticImmutableCast<style::HeatmapLayer::Impl>(std::move(impl)));
-}
-
} // namespace mbgl
diff --git a/src/mbgl/style/layers/hillshade_layer.cpp b/src/mbgl/style/layers/hillshade_layer.cpp
index d914d0cdea..0ae63b18c6 100644
--- a/src/mbgl/style/layers/hillshade_layer.cpp
+++ b/src/mbgl/style/layers/hillshade_layer.cpp
@@ -11,8 +11,6 @@
#include <mbgl/style/conversion_impl.hpp>
#include <mbgl/util/fnv_hash.hpp>
-#include <mbgl/renderer/layers/render_hillshade_layer.hpp>
-
namespace mbgl {
namespace style {
@@ -438,24 +436,4 @@ Mutable<Layer::Impl> HillshadeLayer::mutableBaseImpl() const {
}
} // namespace style
-
-const style::LayerTypeInfo* HillshadeLayerFactory::getTypeInfo() const noexcept {
- return style::HillshadeLayer::Impl::staticTypeInfo();
-}
-
-std::unique_ptr<style::Layer> HillshadeLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
- optional<std::string> source = getSource(value);
- if (!source) {
- return nullptr;
- }
-
- std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::HillshadeLayer(id, *source));
- return layer;
-}
-
-std::unique_ptr<RenderLayer> HillshadeLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
- assert(impl->getTypeInfo() == getTypeInfo());
- return std::make_unique<RenderHillshadeLayer>(staticImmutableCast<style::HillshadeLayer::Impl>(std::move(impl)));
-}
-
} // namespace mbgl
diff --git a/src/mbgl/style/layers/layer.cpp.ejs b/src/mbgl/style/layers/layer.cpp.ejs
index d03e41da76..e34386fc20 100644
--- a/src/mbgl/style/layers/layer.cpp.ejs
+++ b/src/mbgl/style/layers/layer.cpp.ejs
@@ -16,8 +16,6 @@
#include <mbgl/style/conversion_impl.hpp>
#include <mbgl/util/fnv_hash.hpp>
-#include <mbgl/renderer/layers/render_<%- type.replace('-', '_') %>_layer.hpp>
-
namespace mbgl {
namespace style {
@@ -314,34 +312,4 @@ Mutable<Layer::Impl> <%- camelize(type) %>Layer::mutableBaseImpl() const {
}
} // namespace style
-
-const style::LayerTypeInfo* <%- camelize(type) %>LayerFactory::getTypeInfo() const noexcept {
- return style::<%- camelize(type) %>Layer::Impl::staticTypeInfo();
-}
-
-std::unique_ptr<style::Layer> <%- camelize(type) %>LayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
-<% if (type === 'background') { -%>
- (void)value;
- return std::unique_ptr<style::Layer>(new style::<%- camelize(type) %>Layer(id));
-<% } else { -%>
- optional<std::string> source = getSource(value);
- if (!source) {
- return nullptr;
- }
-
- std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::<%- camelize(type) %>Layer(id, *source));
-<% if (type !== 'raster' && type !== 'hillshade') { -%>
- if (!initSourceLayerAndFilter(layer.get(), value)) {
- return nullptr;
- }
-<% } -%>
- return layer;
-<% } -%>
-}
-
-std::unique_ptr<RenderLayer> <%- camelize(type) %>LayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
- assert(impl->getTypeInfo() == getTypeInfo());
- return std::make_unique<Render<%- camelize(type) %>Layer>(staticImmutableCast<style::<%- camelize(type) %>Layer::Impl>(std::move(impl)));
-}
-
} // namespace mbgl
diff --git a/src/mbgl/style/layers/line_layer.cpp b/src/mbgl/style/layers/line_layer.cpp
index f021a5fd73..9b101a1948 100644
--- a/src/mbgl/style/layers/line_layer.cpp
+++ b/src/mbgl/style/layers/line_layer.cpp
@@ -11,8 +11,6 @@
#include <mbgl/style/conversion_impl.hpp>
#include <mbgl/util/fnv_hash.hpp>
-#include <mbgl/renderer/layers/render_line_layer.hpp>
-
namespace mbgl {
namespace style {
@@ -845,27 +843,4 @@ Mutable<Layer::Impl> LineLayer::mutableBaseImpl() const {
}
} // namespace style
-
-const style::LayerTypeInfo* LineLayerFactory::getTypeInfo() const noexcept {
- return style::LineLayer::Impl::staticTypeInfo();
-}
-
-std::unique_ptr<style::Layer> LineLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
- optional<std::string> source = getSource(value);
- if (!source) {
- return nullptr;
- }
-
- std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::LineLayer(id, *source));
- if (!initSourceLayerAndFilter(layer.get(), value)) {
- return nullptr;
- }
- return layer;
-}
-
-std::unique_ptr<RenderLayer> LineLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
- assert(impl->getTypeInfo() == getTypeInfo());
- return std::make_unique<RenderLineLayer>(staticImmutableCast<style::LineLayer::Impl>(std::move(impl)));
-}
-
} // namespace mbgl
diff --git a/src/mbgl/style/layers/raster_layer.cpp b/src/mbgl/style/layers/raster_layer.cpp
index 40224a0b6d..ea3ec3e31c 100644
--- a/src/mbgl/style/layers/raster_layer.cpp
+++ b/src/mbgl/style/layers/raster_layer.cpp
@@ -11,8 +11,6 @@
#include <mbgl/style/conversion_impl.hpp>
#include <mbgl/util/fnv_hash.hpp>
-#include <mbgl/renderer/layers/render_raster_layer.hpp>
-
namespace mbgl {
namespace style {
@@ -527,24 +525,4 @@ Mutable<Layer::Impl> RasterLayer::mutableBaseImpl() const {
}
} // namespace style
-
-const style::LayerTypeInfo* RasterLayerFactory::getTypeInfo() const noexcept {
- return style::RasterLayer::Impl::staticTypeInfo();
-}
-
-std::unique_ptr<style::Layer> RasterLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
- optional<std::string> source = getSource(value);
- if (!source) {
- return nullptr;
- }
-
- std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::RasterLayer(id, *source));
- return layer;
-}
-
-std::unique_ptr<RenderLayer> RasterLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
- assert(impl->getTypeInfo() == getTypeInfo());
- return std::make_unique<RenderRasterLayer>(staticImmutableCast<style::RasterLayer::Impl>(std::move(impl)));
-}
-
} // namespace mbgl
diff --git a/src/mbgl/style/layers/symbol_layer.cpp b/src/mbgl/style/layers/symbol_layer.cpp
index f4fbf550f2..be25594f54 100644
--- a/src/mbgl/style/layers/symbol_layer.cpp
+++ b/src/mbgl/style/layers/symbol_layer.cpp
@@ -11,8 +11,6 @@
#include <mbgl/style/conversion_impl.hpp>
#include <mbgl/util/fnv_hash.hpp>
-#include <mbgl/renderer/layers/render_symbol_layer.hpp>
-
namespace mbgl {
namespace style {
@@ -1995,27 +1993,4 @@ Mutable<Layer::Impl> SymbolLayer::mutableBaseImpl() const {
}
} // namespace style
-
-const style::LayerTypeInfo* SymbolLayerFactory::getTypeInfo() const noexcept {
- return style::SymbolLayer::Impl::staticTypeInfo();
-}
-
-std::unique_ptr<style::Layer> SymbolLayerFactory::createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept {
- optional<std::string> source = getSource(value);
- if (!source) {
- return nullptr;
- }
-
- std::unique_ptr<style::Layer> layer = std::unique_ptr<style::Layer>(new style::SymbolLayer(id, *source));
- if (!initSourceLayerAndFilter(layer.get(), value)) {
- return nullptr;
- }
- return layer;
-}
-
-std::unique_ptr<RenderLayer> SymbolLayerFactory::createRenderLayer(Immutable<style::Layer::Impl> impl) noexcept {
- assert(impl->getTypeInfo() == getTypeInfo());
- return std::make_unique<RenderSymbolLayer>(staticImmutableCast<style::SymbolLayer::Impl>(std::move(impl)));
-}
-
} // namespace mbgl