summaryrefslogtreecommitdiff
path: root/src/mbgl/text/placement.cpp
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2020-03-25 17:03:52 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2020-04-02 11:50:52 +0300
commit5f4e33b1a3d14cdbebbfe724e51bdcba11f44437 (patch)
tree1c0d6fee60ad678f398196d2a7d7d47ab0ca167b /src/mbgl/text/placement.cpp
parent4bdb3ce200e1b6c7d1838d6ebabf18debd331e04 (diff)
downloadqtlocation-mapboxgl-5f4e33b1a3d14cdbebbfe724e51bdcba11f44437.tar.gz
[core] Introduce API to collect placed symbols data
The following methods are added to the `Renderer` class: - `collectPlacedSymbolData()` enables or disables collecting of the placed symbols data - `getPlacedSymbolsData()` if collecting of the placed symbols data is enabled, returns the reference to the `PlacedSymbolData` vector holding the collected data.
Diffstat (limited to 'src/mbgl/text/placement.cpp')
-rw-r--r--src/mbgl/text/placement.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mbgl/text/placement.cpp b/src/mbgl/text/placement.cpp
index 0436a3ccd5..eaea1114d6 100644
--- a/src/mbgl/text/placement.cpp
+++ b/src/mbgl/text/placement.cpp
@@ -1142,6 +1142,11 @@ bool Placement::hasTransitions(TimePoint now) const {
transitionOptions.duration.value_or(util::DEFAULT_TRANSITION_DURATION);
}
+const std::vector<PlacedSymbolData>& Placement::getPlacedSymbolsData() const {
+ const static std::vector<PlacedSymbolData> data;
+ return data;
+}
+
const CollisionIndex& Placement::getCollisionIndex() const {
return collisionIndex;
}