summaryrefslogtreecommitdiff
path: root/src/mbgl/style
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style')
-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
11 files changed, 0 insertions, 257 deletions
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