diff options
author | Sudarsana Babu Nagineni <sudarsana.babu@mapbox.com> | 2019-03-26 00:00:37 +0200 |
---|---|---|
committer | Sudarsana Babu Nagineni <sudarsana.babu@mapbox.com> | 2019-03-28 16:41:15 +0200 |
commit | 1cc1d4ea08ae02c3cc9b4dd1474845456c17d1bc (patch) | |
tree | d7de92e01ef1b1bf654ff8784534e534608a352f /benchmark | |
parent | 11afef7825d622a237fa026e45e6d61b4de94068 (diff) | |
download | qtlocation-mapboxgl-1cc1d4ea08ae02c3cc9b4dd1474845456c17d1bc.tar.gz |
[core] Add setter/getter for size property in MapOptions
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/api/query.benchmark.cpp | 4 | ||||
-rw-r--r-- | benchmark/api/render.benchmark.cpp | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/benchmark/api/query.benchmark.cpp b/benchmark/api/query.benchmark.cpp index 5e273d69ac..1db958c1be 100644 --- a/benchmark/api/query.benchmark.cpp +++ b/benchmark/api/query.benchmark.cpp @@ -32,8 +32,8 @@ public: util::RunLoop loop; ThreadPool threadPool{ 4 }; HeadlessFrontend frontend { { 1000, 1000 }, 1, threadPool }; - Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), 1, threadPool, - MapOptions().withMapMode(MapMode::Static), + Map map { frontend, MapObserver::nullObserver(), 1, threadPool, + MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()), ResourceOptions().withCachePath("benchmark/fixtures/api/cache.db").withAssetPath(".").withAccessToken("foobar") }; ScreenBox box{{ 0, 0 }, { 1000, 1000 }}; }; diff --git a/benchmark/api/render.benchmark.cpp b/benchmark/api/render.benchmark.cpp index b66c3f228c..378ea705f1 100644 --- a/benchmark/api/render.benchmark.cpp +++ b/benchmark/api/render.benchmark.cpp @@ -45,8 +45,8 @@ static void prepare(Map& map, optional<std::string> json = {}) { static void API_renderStill_reuse_map(::benchmark::State& state) { RenderBenchmark bench; HeadlessFrontend frontend { size, pixelRatio, bench.threadPool }; - Map map { frontend, MapObserver::nullObserver(), size, pixelRatio, bench.threadPool, - MapOptions().withMapMode(MapMode::Static), + Map map { frontend, MapObserver::nullObserver(), pixelRatio, bench.threadPool, + MapOptions().withMapMode(MapMode::Static).withSize(size), ResourceOptions().withCachePath(cachePath).withAccessToken("foobar") }; prepare(map); @@ -58,8 +58,8 @@ static void API_renderStill_reuse_map(::benchmark::State& state) { static void API_renderStill_reuse_map_formatted_labels(::benchmark::State& state) { RenderBenchmark bench; HeadlessFrontend frontend { size, pixelRatio, bench.threadPool }; - Map map { frontend, MapObserver::nullObserver(), size, pixelRatio, bench.threadPool, - MapOptions().withMapMode(MapMode::Static), ResourceOptions().withCachePath(cachePath).withAccessToken("foobar") }; + Map map { frontend, MapObserver::nullObserver(), pixelRatio, bench.threadPool, + MapOptions().withMapMode(MapMode::Static).withSize(size), ResourceOptions().withCachePath(cachePath).withAccessToken("foobar") }; prepare(map, util::read_file("benchmark/fixtures/api/style_formatted_labels.json")); while (state.KeepRunning()) { @@ -70,8 +70,8 @@ static void API_renderStill_reuse_map_formatted_labels(::benchmark::State& state static void API_renderStill_reuse_map_switch_styles(::benchmark::State& state) { RenderBenchmark bench; HeadlessFrontend frontend { size, pixelRatio, bench.threadPool }; - Map map { frontend, MapObserver::nullObserver(), size, pixelRatio, bench.threadPool, - MapOptions().withMapMode(MapMode::Static), ResourceOptions().withCachePath(cachePath).withAccessToken("foobar") }; + Map map { frontend, MapObserver::nullObserver(), pixelRatio, bench.threadPool, + MapOptions().withMapMode(MapMode::Static).withSize(size), ResourceOptions().withCachePath(cachePath).withAccessToken("foobar") }; while (state.KeepRunning()) { prepare(map, { "{}" }); @@ -86,8 +86,8 @@ static void API_renderStill_recreate_map(::benchmark::State& state) { while (state.KeepRunning()) { HeadlessFrontend frontend { size, pixelRatio, bench.threadPool }; - Map map { frontend, MapObserver::nullObserver(), size, pixelRatio, bench.threadPool, - MapOptions().withMapMode(MapMode::Static), ResourceOptions().withCachePath(cachePath).withAccessToken("foobar") }; + Map map { frontend, MapObserver::nullObserver(), pixelRatio, bench.threadPool, + MapOptions().withMapMode(MapMode::Static).withSize(size), ResourceOptions().withCachePath(cachePath).withAccessToken("foobar") }; prepare(map); frontend.render(map); } |