[core] Add possibility of overriding paint properties inside format expression #14062

* [core] Add format override expression and formatted section to evaluation context

* [core] Add textColor to TaggedString's formatted section

* [core] Add FormatSectionOverrides and introduce overridable properties

* [core] Populate symbol layer paint properties for text sections

* [core] Add benchmark for style that uses text-color override

* [core] Add unit test for FormatOverrideExpression

* [core] Add unit test for FormatSectionOverrides
This commit is contained in:
Alexander Shalamov
2019-03-11 10:26:19 +02:00
parent 8a51362bcc
commit 8be135231d
40 changed files with 4798 additions and 262 deletions

View File

@@ -23,7 +23,7 @@ static void Parse_Filter(benchmark::State& state) {
static void Parse_EvaluateFilter(benchmark::State& state) {
const style::Filter filter = parse(R"FILTER(["==", "foo", "bar"])FILTER");
const StubGeometryTileFeature feature = { {}, FeatureType::Unknown , {}, {{ "foo", std::string("bar") }} };
const style::expression::EvaluationContext context = { &feature };
const style::expression::EvaluationContext context(&feature);
while (state.KeepRunning()) {
filter(context);