diff options
Diffstat (limited to 'src/mbgl/renderer/buckets/symbol_bucket.hpp')
-rw-r--r-- | src/mbgl/renderer/buckets/symbol_bucket.hpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/mbgl/renderer/buckets/symbol_bucket.hpp b/src/mbgl/renderer/buckets/symbol_bucket.hpp index 2b41ac9295..3cdea1310c 100644 --- a/src/mbgl/renderer/buckets/symbol_bucket.hpp +++ b/src/mbgl/renderer/buckets/symbol_bucket.hpp @@ -1,16 +1,17 @@ #pragma once -#include <mbgl/renderer/bucket.hpp> -#include <mbgl/map/mode.hpp> -#include <mbgl/gfx/vertex_buffer.hpp> #include <mbgl/gfx/index_buffer.hpp> +#include <mbgl/gfx/vertex_buffer.hpp> +#include <mbgl/layout/symbol_feature.hpp> +#include <mbgl/layout/symbol_instance.hpp> +#include <mbgl/map/mode.hpp> +#include <mbgl/programs/collision_box_program.hpp> #include <mbgl/programs/segment.hpp> #include <mbgl/programs/symbol_program.hpp> -#include <mbgl/programs/collision_box_program.hpp> -#include <mbgl/text/glyph_range.hpp> +#include <mbgl/renderer/bucket.hpp> #include <mbgl/style/layers/symbol_layer_properties.hpp> -#include <mbgl/layout/symbol_feature.hpp> -#include <mbgl/layout/symbol_instance.hpp> +#include <mbgl/text/glyph_range.hpp> +#include <mbgl/text/placement.hpp> #include <vector> @@ -97,8 +98,11 @@ public: void sortFeatures(const float angle); - // The result contains references to the `symbolInstances` items, sorted by viewport Y. - std::vector<std::reference_wrapper<const SymbolInstance>> getSortedSymbols(const float angle) const; + // Returns references to the `symbolInstances` items, sorted by viewport Y. + SymbolInstanceReferences getSortedSymbols(const float angle) const; + // Returns references to the `symbolInstances` items, which belong to the `sortKeyRange` range; + // returns references to all the symbols if |sortKeyRange| is `nullopt`. + SymbolInstanceReferences getSymbols(const optional<SortKeyRange>& sortKeyRange = nullopt) const; Immutable<style::SymbolLayoutProperties::PossiblyEvaluated> layout; const std::string bucketLeaderID; @@ -118,7 +122,7 @@ public: bool hasUninitializedSymbols : 1; std::vector<SymbolInstance> symbolInstances; - std::vector<SortKeyRange> sortKeyRanges; + const std::vector<SortKeyRange> sortKeyRanges; struct PaintProperties { SymbolIconProgram::Binders iconBinders; |