Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[benchmark] rendering interface changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ivovandongen committed Jun 29, 2017
1 parent 13bb428 commit d6e80ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion benchmark/api/query.benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <mbgl/gl/headless_backend.hpp>
#include <mbgl/gl/offscreen_view.hpp>
#include <mbgl/util/default_thread_pool.hpp>
#include <mbgl/renderer/async_renderer_frontend.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/style/image.hpp>
#include <mbgl/storage/default_file_source.hpp>
Expand Down Expand Up @@ -38,7 +39,7 @@ class QueryBenchmark {
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 { std::make_unique<AsyncRendererFrontend>(backend, view), MapObserver::nullObserver(), view.getSize(), 1, fileSource, threadPool, MapMode::Still };
ScreenBox box{{ 0, 0 }, { 1000, 1000 }};
};

Expand Down
2 changes: 1 addition & 1 deletion benchmark/src/mbgl/benchmark/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace benchmark {

void render(Map& map, OffscreenView& view) {
PremultipliedImage result;
map.renderStill(view, [&](std::exception_ptr) {
map.renderStill([&](std::exception_ptr) {
result = view.readStillImage();
});

Expand Down
2 changes: 2 additions & 0 deletions cmake/benchmark.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
add_executable(mbgl-benchmark
platform/default/mbgl/renderer/async_renderer_frontend.cpp
platform/default/mbgl/renderer/async_renderer_frontend.hpp
${MBGL_BENCHMARK_FILES}
)

Expand Down

0 comments on commit d6e80ba

Please sign in to comment.