summaryrefslogtreecommitdiff
path: root/benchmark/api/query.benchmark.cpp
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2019-03-19 16:57:36 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2019-03-20 21:30:08 +0200
commitd5868d3da822f2bf3297229bd879e76853108a63 (patch)
treeb3d28aab92b938cf541f917f1027d2bbd06d9780 /benchmark/api/query.benchmark.cpp
parentd1762d7111b39d45430bd7bb75ea60b7a5d85bd2 (diff)
downloadqtlocation-mapboxgl-d5868d3da822f2bf3297229bd879e76853108a63.tar.gz
[core] Remove file source from public Map ctor
Diffstat (limited to 'benchmark/api/query.benchmark.cpp')
-rw-r--r--benchmark/api/query.benchmark.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/benchmark/api/query.benchmark.cpp b/benchmark/api/query.benchmark.cpp
index 47eba7a9fe..5e273d69ac 100644
--- a/benchmark/api/query.benchmark.cpp
+++ b/benchmark/api/query.benchmark.cpp
@@ -7,7 +7,6 @@
#include <mbgl/renderer/renderer.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/style/image.hpp>
-#include <mbgl/storage/default_file_source.hpp>
#include <mbgl/storage/network_status.hpp>
#include <mbgl/util/image.hpp>
#include <mbgl/util/io.hpp>
@@ -21,7 +20,6 @@ class QueryBenchmark {
public:
QueryBenchmark() {
NetworkStatus::Set(NetworkStatus::Status::Offline);
- fileSource.setAccessToken("foobar");
map.getStyle().loadJSON(util::read_file("benchmark/fixtures/api/style.json"));
map.jumpTo(CameraOptions().withCenter(LatLng { 40.726989, -73.992857 }).withZoom(15.0)); // Manhattan
@@ -32,11 +30,11 @@ public:
}
util::RunLoop loop;
- DefaultFileSource fileSource{ "benchmark/fixtures/api/cache.db", "." };
ThreadPool threadPool{ 4 };
HeadlessFrontend frontend { { 1000, 1000 }, 1, threadPool };
- Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), 1,
- fileSource, threadPool, MapOptions().withMapMode(MapMode::Static) };
+ Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), 1, threadPool,
+ MapOptions().withMapMode(MapMode::Static),
+ ResourceOptions().withCachePath("benchmark/fixtures/api/cache.db").withAssetPath(".").withAccessToken("foobar") };
ScreenBox box{{ 0, 0 }, { 1000, 1000 }};
};