[core] Add support for set/getFeatureState APIs

This commit is contained in:
Juha Alanen
2019-08-21 14:39:36 +03:00
committed by Juha Alanen
parent 46eab5f148
commit 8e19be9d9c
7 changed files with 85 additions and 0 deletions

View File

@@ -562,6 +562,24 @@ FeatureExtensionValue RenderOrchestrator::queryFeatureExtensions(const std::stri
return {};
}
void RenderOrchestrator::setFeatureState(const std::string& sourceID,
const optional<std::string>& sourceLayerID,
const std::string& featureID,
const FeatureState& state) {
if (RenderSource* renderSource = getRenderSource(sourceID)) {
renderSource->setFeatureState(sourceLayerID, featureID, state);
}
}
void RenderOrchestrator::getFeatureState(FeatureState& state,
const std::string& sourceID,
const optional<std::string>& sourceLayerID,
const std::string& featureID) const {
if (RenderSource* renderSource = getRenderSource(sourceID)) {
renderSource->getFeatureState(state, sourceLayerID, featureID);
}
}
void RenderOrchestrator::reduceMemoryUse() {
filteredLayersForSource.shrink_to_fit();
for (const auto& entry : renderSources) {