diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-04-01 11:29:28 +0300 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-04-17 17:21:41 +0300 |
commit | 4b21560cf59877125ea0bdae1a2546ab06f1efb2 (patch) | |
tree | bd7f76fd51c29c63ef7b15964752f9c8c9e3bf38 /include | |
parent | 1a66a02097f0e3c95a4d06610fc0b7609f6d77b9 (diff) | |
download | qtlocation-mapboxgl-4b21560cf59877125ea0bdae1a2546ab06f1efb2.tar.gz |
[core] Use `style::LayerProperties` in render layers, buckets and layouts.
Diffstat (limited to 'include')
8 files changed, 17 insertions, 10 deletions
diff --git a/include/mbgl/layermanager/circle_layer_factory.hpp b/include/mbgl/layermanager/circle_layer_factory.hpp index e9eb0f59cc..51135d3383 100644 --- a/include/mbgl/layermanager/circle_layer_factory.hpp +++ b/include/mbgl/layermanager/circle_layer_factory.hpp @@ -8,7 +8,7 @@ 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<Bucket> createBucket(const BucketParameters&, const std::vector<const RenderLayer*>&) noexcept final; + std::unique_ptr<Bucket> createBucket(const BucketParameters&, const std::vector<Immutable<style::LayerProperties>>&) noexcept final; std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final; }; diff --git a/include/mbgl/layermanager/fill_extrusion_layer_factory.hpp b/include/mbgl/layermanager/fill_extrusion_layer_factory.hpp index 3430d3da1c..fbaa5c1254 100644 --- a/include/mbgl/layermanager/fill_extrusion_layer_factory.hpp +++ b/include/mbgl/layermanager/fill_extrusion_layer_factory.hpp @@ -8,7 +8,7 @@ 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<Layout> createLayout(const LayoutParameters&, std::unique_ptr<GeometryTileLayer>, const std::vector<const RenderLayer*>&) noexcept final; + std::unique_ptr<Layout> createLayout(const LayoutParameters&, std::unique_ptr<GeometryTileLayer>, const std::vector<Immutable<style::LayerProperties>>&) noexcept final; std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final; }; diff --git a/include/mbgl/layermanager/fill_layer_factory.hpp b/include/mbgl/layermanager/fill_layer_factory.hpp index 22762d1290..09afb0dc3a 100644 --- a/include/mbgl/layermanager/fill_layer_factory.hpp +++ b/include/mbgl/layermanager/fill_layer_factory.hpp @@ -8,7 +8,7 @@ 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<Layout> createLayout(const LayoutParameters&, std::unique_ptr<GeometryTileLayer>, const std::vector<const RenderLayer*>&) noexcept final; + std::unique_ptr<Layout> createLayout(const LayoutParameters&, std::unique_ptr<GeometryTileLayer>, const std::vector<Immutable<style::LayerProperties>>&) noexcept final; std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final; }; diff --git a/include/mbgl/layermanager/heatmap_layer_factory.hpp b/include/mbgl/layermanager/heatmap_layer_factory.hpp index 306af60938..2d0e1a5a02 100644 --- a/include/mbgl/layermanager/heatmap_layer_factory.hpp +++ b/include/mbgl/layermanager/heatmap_layer_factory.hpp @@ -8,7 +8,7 @@ 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<Bucket> createBucket(const BucketParameters&, const std::vector<const RenderLayer*>&) noexcept final; + std::unique_ptr<Bucket> createBucket(const BucketParameters&, const std::vector<Immutable<style::LayerProperties>>&) noexcept final; std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final; }; diff --git a/include/mbgl/layermanager/layer_factory.hpp b/include/mbgl/layermanager/layer_factory.hpp index 037de1b647..f3cfef6bb6 100644 --- a/include/mbgl/layermanager/layer_factory.hpp +++ b/include/mbgl/layermanager/layer_factory.hpp @@ -6,6 +6,9 @@ namespace mbgl { +namespace style { +class LayerProperties; +} // namespace style class Bucket; class BucketParameters; class GeometryTileLayer; @@ -28,9 +31,9 @@ public: /// Returns a new RenderLayer instance. virtual std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept = 0; /// Returns a new Bucket instance on success call; returns `nullptr` otherwise. - virtual std::unique_ptr<Bucket> createBucket(const BucketParameters&, const std::vector<const RenderLayer*>&) noexcept; + virtual std::unique_ptr<Bucket> createBucket(const BucketParameters&, const std::vector<Immutable<style::LayerProperties>>&) noexcept; /// Returns a new Layout instance on success call; returns `nullptr` otherwise. - virtual std::unique_ptr<Layout> createLayout(const LayoutParameters&, std::unique_ptr<GeometryTileLayer>, const std::vector<const RenderLayer*>&) noexcept; + virtual std::unique_ptr<Layout> createLayout(const LayoutParameters&, std::unique_ptr<GeometryTileLayer>, const std::vector<Immutable<style::LayerProperties>>&) noexcept; protected: optional<std::string> getSource(const style::conversion::Convertible& value) const noexcept; diff --git a/include/mbgl/layermanager/layer_manager.hpp b/include/mbgl/layermanager/layer_manager.hpp index de10b0207c..c6802dbb49 100644 --- a/include/mbgl/layermanager/layer_manager.hpp +++ b/include/mbgl/layermanager/layer_manager.hpp @@ -5,6 +5,9 @@ #include <vector> namespace mbgl { +namespace style { +class LayerProperties; +} // namespace style class GeometryTileLayer; class LayerFactory; class RenderLayer; @@ -37,9 +40,10 @@ public: /// Returns a new RenderLayer instance on success call; returns `nullptr` otherwise. std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept; /// Returns a new Bucket instance on success call; returns `nullptr` otherwise. - std::unique_ptr<Bucket> createBucket(const BucketParameters&, const std::vector<const RenderLayer*>&) noexcept; + std::unique_ptr<Bucket> createBucket(const BucketParameters&, const std::vector<Immutable<style::LayerProperties>>&) noexcept; /// Returns a new Layout instance on success call; returns `nullptr` otherwise. - std::unique_ptr<Layout> createLayout(const LayoutParameters&, std::unique_ptr<GeometryTileLayer>, const std::vector<const RenderLayer*>&) noexcept; + std::unique_ptr<Layout> createLayout(const LayoutParameters&, std::unique_ptr<GeometryTileLayer>, + const std::vector<Immutable<style::LayerProperties>>&) noexcept; /** * @brief a build-time flag to enable/disable annotations in mapbox-gl-native core. diff --git a/include/mbgl/layermanager/line_layer_factory.hpp b/include/mbgl/layermanager/line_layer_factory.hpp index a7081228ee..803f550e57 100644 --- a/include/mbgl/layermanager/line_layer_factory.hpp +++ b/include/mbgl/layermanager/line_layer_factory.hpp @@ -10,7 +10,7 @@ protected: std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final; std::unique_ptr<Layout> createLayout(const LayoutParameters& parameters, std::unique_ptr<GeometryTileLayer> tileLayer, - const std::vector<const RenderLayer*>& group) noexcept final; + const std::vector<Immutable<style::LayerProperties>>& group) noexcept final; std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final; }; diff --git a/include/mbgl/layermanager/symbol_layer_factory.hpp b/include/mbgl/layermanager/symbol_layer_factory.hpp index dac515c9dc..38f382e96c 100644 --- a/include/mbgl/layermanager/symbol_layer_factory.hpp +++ b/include/mbgl/layermanager/symbol_layer_factory.hpp @@ -10,7 +10,7 @@ protected: std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final; std::unique_ptr<Layout> createLayout(const LayoutParameters& parameters, std::unique_ptr<GeometryTileLayer> tileLayer, - const std::vector<const RenderLayer*>& group) noexcept final; + const std::vector<Immutable<style::LayerProperties>>& group) noexcept final; std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final; }; |