summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2017-06-13 10:50:16 +0300
committerIvo van Dongen <ivovandongen@users.noreply.github.com>2017-07-18 10:45:12 +0200
commit57351c068b133ed140ac7b991181672019fe5c24 (patch)
tree2a0be8819c2bc57b1cda7d5c6f98e725a030daa2 /benchmark
parente35cbbae55ab01f33690b1bb2e918c5f8393b854 (diff)
downloadqtlocation-mapboxgl-57351c068b133ed140ac7b991181672019fe5c24.tar.gz
[core] split backend from mapobserver
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/api/query.benchmark.cpp2
-rw-r--r--benchmark/api/render.benchmark.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/benchmark/api/query.benchmark.cpp b/benchmark/api/query.benchmark.cpp
index 4c11a56da5..b88ecb7749 100644
--- a/benchmark/api/query.benchmark.cpp
+++ b/benchmark/api/query.benchmark.cpp
@@ -38,7 +38,7 @@ public:
OffscreenView view{ backend.getContext(), { 1000, 1000 } };
DefaultFileSource fileSource{ "benchmark/fixtures/api/cache.db", "." };
ThreadPool threadPool{ 4 };
- Map map{ backend, view.getSize(), 1, fileSource, threadPool, MapMode::Still };
+ Map map{ backend, MapObserver::nullObserver(), view.getSize(), 1, fileSource, threadPool, MapMode::Still };
ScreenBox box{{ 0, 0 }, { 1000, 1000 }};
};
diff --git a/benchmark/api/render.benchmark.cpp b/benchmark/api/render.benchmark.cpp
index 8c71c1a9bf..aea2af745a 100644
--- a/benchmark/api/render.benchmark.cpp
+++ b/benchmark/api/render.benchmark.cpp
@@ -2,6 +2,7 @@
#include <mbgl/benchmark/util.hpp>
#include <mbgl/map/map.hpp>
+#include <mbgl/map/map_observer.hpp>
#include <mbgl/map/backend_scope.hpp>
#include <mbgl/gl/headless_backend.hpp>
#include <mbgl/gl/offscreen_view.hpp>
@@ -44,7 +45,7 @@ static void prepare(Map& map, optional<std::string> json = {}) {
static void API_renderStill_reuse_map(::benchmark::State& state) {
RenderBenchmark bench;
- Map map { bench.backend, bench.view.getSize(), 1, bench.fileSource, bench.threadPool, MapMode::Still };
+ Map map { bench.backend, MapObserver::nullObserver(), bench.view.getSize(), 1, bench.fileSource, bench.threadPool, MapMode::Still };
prepare(map);
while (state.KeepRunning()) {
@@ -54,7 +55,7 @@ static void API_renderStill_reuse_map(::benchmark::State& state) {
static void API_renderStill_reuse_map_switch_styles(::benchmark::State& state) {
RenderBenchmark bench;
- Map map { bench.backend, bench.view.getSize(), 1, bench.fileSource, bench.threadPool, MapMode::Still };
+ Map map { bench.backend, MapObserver::nullObserver(), bench.view.getSize(), 1, bench.fileSource, bench.threadPool, MapMode::Still };
while (state.KeepRunning()) {
prepare(map, { "{}" });
@@ -68,7 +69,7 @@ static void API_renderStill_recreate_map(::benchmark::State& state) {
RenderBenchmark bench;
while (state.KeepRunning()) {
- Map map { bench.backend, bench.view.getSize(), 1, bench.fileSource, bench.threadPool, MapMode::Still };
+ Map map { bench.backend, MapObserver::nullObserver(), bench.view.getSize(), 1, bench.fileSource, bench.threadPool, MapMode::Still };
prepare(map);
mbgl::benchmark::render(map, bench.view);
}