diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2017-04-21 09:19:47 -0700 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2017-04-25 17:23:54 -0700 |
commit | 3c175adf30546fe58713b8fed29ac35a85e150be (patch) | |
tree | 5666e9bcf311ed1b86a13444e50dc7a030c10da9 /src/mbgl/style/style.hpp | |
parent | ea8ec38df156c6683c886253dbb1f6bc828686ff (diff) | |
download | qtlocation-mapboxgl-3c175adf30546fe58713b8fed29ac35a85e150be.tar.gz |
[core] split off render layers
Diffstat (limited to 'src/mbgl/style/style.hpp')
-rw-r--r-- | src/mbgl/style/style.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mbgl/style/style.hpp b/src/mbgl/style/style.hpp index 13097fbad8..127430a89f 100644 --- a/src/mbgl/style/style.hpp +++ b/src/mbgl/style/style.hpp @@ -5,6 +5,7 @@ #include <mbgl/style/source_observer.hpp> #include <mbgl/style/layer_observer.hpp> #include <mbgl/style/update_batch.hpp> +#include <mbgl/renderer/render_layer.hpp> #include <mbgl/text/glyph_atlas_observer.hpp> #include <mbgl/sprite/sprite_atlas_observer.hpp> #include <mbgl/map/mode.hpp> @@ -31,6 +32,7 @@ class RenderData; class TransformState; class RenderedQueryOptions; class Scheduler; +class RenderLayer; namespace style { @@ -80,6 +82,11 @@ public: optional<std::string> beforeLayerID = {}); std::unique_ptr<Layer> removeLayer(const std::string& layerID); + // Should be moved to Impl eventually + std::vector<const RenderLayer*> getRenderLayers() const; + std::vector<RenderLayer*> getRenderLayers(); + RenderLayer* getRenderLayer(const std::string& id) const; + std::string getName() const; LatLng getDefaultLatLng() const; double getDefaultZoom() const; @@ -116,6 +123,7 @@ public: private: std::vector<std::unique_ptr<Source>> sources; std::vector<std::unique_ptr<Layer>> layers; + std::vector<std::unique_ptr<RenderLayer>> renderLayers; std::vector<std::string> classes; TransitionOptions transitionOptions; @@ -127,6 +135,7 @@ private: double defaultPitch = 0; std::vector<std::unique_ptr<Layer>>::const_iterator findLayer(const std::string& layerID) const; + std::vector<std::unique_ptr<RenderLayer>>::const_iterator findRenderLayer(const std::string&) const; void reloadLayerSource(Layer&); // GlyphStoreObserver implementation. @@ -161,6 +170,7 @@ private: ZoomHistory zoomHistory; bool hasPendingTransitions = false; + void removeRenderLayer(const std::string& layerID); public: bool loaded = false; }; |