summaryrefslogtreecommitdiff
path: root/benchmark/api
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-04-21 14:52:19 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-04-24 15:52:28 -0700
commit5dd98df50ba1210b1eef0d8d6655713a725f2995 (patch)
treeb289bb3cbad5d1c3076816f4891a057d6089fc93 /benchmark/api
parent6f708ac5458fe332e25ca398431928b7ff5ba404 (diff)
downloadqtlocation-mapboxgl-5dd98df50ba1210b1eef0d8d6655713a725f2995.tar.gz
[all] Rationalize style::Image
A style has a collection of images, just as it has collections of sources and layers. * Name things appropriately * Use std::unique_ptr
Diffstat (limited to 'benchmark/api')
-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 197103f060..faf6c4fbe4 100644
--- a/benchmark/api/query.benchmark.cpp
+++ b/benchmark/api/query.benchmark.cpp
@@ -6,7 +6,7 @@
#include <mbgl/gl/headless_backend.hpp>
#include <mbgl/gl/offscreen_view.hpp>
#include <mbgl/util/default_thread_pool.hpp>
-#include <mbgl/sprite/sprite_image.hpp>
+#include <mbgl/style/image.hpp>
#include <mbgl/storage/default_file_source.hpp>
#include <mbgl/storage/network_status.hpp>
#include <mbgl/util/image.hpp>
@@ -25,10 +25,8 @@ public:
map.setStyleJSON(util::read_file("benchmark/fixtures/api/query_style.json"));
map.setLatLngZoom({ 40.726989, -73.992857 }, 15); // Manhattan
-
- auto decoded = decodeImage(util::read_file("benchmark/fixtures/api/default_marker.png"));
- auto image = std::make_unique<SpriteImage>(std::move(decoded), 1.0);
- map.addImage("test-icon", std::move(image));
+ map.addImage("test-icon", std::make_unique<style::Image>(
+ decodeImage(util::read_file("benchmark/fixtures/api/default_marker.png")), 1.0));
mbgl::benchmark::render(map, view);
}