summaryrefslogtreecommitdiff
path: root/src/mbgl/layermanager/custom_layer_factory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/layermanager/custom_layer_factory.cpp')
-rw-r--r--src/mbgl/layermanager/custom_layer_factory.cpp22
1 files changed, 22 insertions, 0 deletions
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