diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-03-11 10:26:19 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-03-13 17:14:53 +0200 |
commit | 8be135231d9efe41a3b12037518d02b36104e8cf (patch) | |
tree | efecd5380232f899aed2cd5824dc16f057f0469a /benchmark/api/render.benchmark.cpp | |
parent | 8a51362bccbd6487dd1ed8518443b16ba6114fd8 (diff) | |
download | qtlocation-mapboxgl-8be135231d9efe41a3b12037518d02b36104e8cf.tar.gz |
[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
Diffstat (limited to 'benchmark/api/render.benchmark.cpp')
-rw-r--r-- | benchmark/api/render.benchmark.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/benchmark/api/render.benchmark.cpp b/benchmark/api/render.benchmark.cpp index 8709f18d9c..f74a31647c 100644 --- a/benchmark/api/render.benchmark.cpp +++ b/benchmark/api/render.benchmark.cpp @@ -51,6 +51,18 @@ static void API_renderStill_reuse_map(::benchmark::State& state) { } } +static void API_renderStill_reuse_map_formatted_labels(::benchmark::State& state) { + RenderBenchmark bench; + HeadlessFrontend frontend { { 1000, 1000 }, 1, bench.fileSource, bench.threadPool }; + Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), 1, + bench.fileSource, bench.threadPool, MapOptions().withMapMode(MapMode::Static) }; + prepare(map, util::read_file("benchmark/fixtures/api/style_formatted_labels.json")); + + while (state.KeepRunning()) { + frontend.render(map); + } +} + static void API_renderStill_reuse_map_switch_styles(::benchmark::State& state) { RenderBenchmark bench; HeadlessFrontend frontend { { 1000, 1000 }, 1, bench.fileSource, bench.threadPool }; @@ -78,5 +90,6 @@ static void API_renderStill_recreate_map(::benchmark::State& state) { } BENCHMARK(API_renderStill_reuse_map); +BENCHMARK(API_renderStill_reuse_map_formatted_labels); BENCHMARK(API_renderStill_reuse_map_switch_styles); BENCHMARK(API_renderStill_recreate_map); |