diff options
author | danswick <dan.swick@gmail.com> | 2019-09-18 11:39:43 -0700 |
---|---|---|
committer | danswick <dan.swick@gmail.com> | 2019-09-18 11:39:43 -0700 |
commit | 46914ecff8b3f2a1945b33358a879c2aac074f17 (patch) | |
tree | 697cf276a43ae4c18c0ad7029c00e7d771448822 /src/mbgl/renderer/source_state.hpp | |
parent | 47ea84ad1a5fed3431d026c5765c17c507d4623e (diff) | |
parent | 8805defe57aa0d8886c7828d39b1b9b1f17f21b8 (diff) | |
download | qtlocation-mapboxgl-upstream/android-docs-automation.tar.gz |
Merge branch 'master' into android-docs-automationupstream/android-docs-automation
Diffstat (limited to 'src/mbgl/renderer/source_state.hpp')
-rw-r--r-- | src/mbgl/renderer/source_state.hpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/mbgl/renderer/source_state.hpp b/src/mbgl/renderer/source_state.hpp new file mode 100644 index 0000000000..7217302630 --- /dev/null +++ b/src/mbgl/renderer/source_state.hpp @@ -0,0 +1,29 @@ +#pragma once + +#include <mbgl/style/conversion.hpp> +#include <mbgl/util/feature.hpp> + +namespace mbgl { + +class RenderTile; + +class SourceFeatureState { +public: + SourceFeatureState() = default; + ~SourceFeatureState() = default; + + void updateState(const optional<std::string>& sourceLayerID, const std::string& featureID, + const FeatureState& newState); + void getState(FeatureState& result, const optional<std::string>& sourceLayerID, const std::string& featureID) const; + void removeState(const optional<std::string>& sourceLayerID, const optional<std::string>& featureID, + const optional<std::string>& stateKey); + + void coalesceChanges(std::vector<RenderTile>& tiles); + +private: + LayerFeatureStates currentStates; + LayerFeatureStates stateChanges; + LayerFeatureStates deletedStates; +}; + +} // namespace mbgl |