summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2014-09-22 14:05:15 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2014-09-22 14:05:15 -0700
commit4b98870e99dfa0aaa63c15a225e971872f8ade71 (patch)
tree2ab20fb164aa4640ec02bc2a5d2749c5f66743a3 /common
parent896379daa5da936039511c5c3e06c92e6a59a50d (diff)
downloadqtlocation-mapboxgl-4b98870e99dfa0aaa63c15a225e971872f8ade71.tar.gz
Support pixelRatio parameter for render tests
Diffstat (limited to 'common')
-rw-r--r--common/headless_view.cpp5
-rw-r--r--common/headless_view.hpp2
2 files changed, 5 insertions, 2 deletions
diff --git a/common/headless_view.cpp b/common/headless_view.cpp
index f790d90cec..ed00f48e82 100644
--- a/common/headless_view.cpp
+++ b/common/headless_view.cpp
@@ -65,9 +65,12 @@ HeadlessView::HeadlessView() {
}
-void HeadlessView::resize(int width, int height) {
+void HeadlessView::resize(uint16_t width, uint16_t height, float pixelRatio) {
clear_buffers();
+ width *= pixelRatio;
+ height *= pixelRatio;
+
#if MBGL_USE_CGL
make_active();
diff --git a/common/headless_view.hpp b/common/headless_view.hpp
index 0b255b4a38..a8ce4aa325 100644
--- a/common/headless_view.hpp
+++ b/common/headless_view.hpp
@@ -19,7 +19,7 @@ public:
HeadlessView();
~HeadlessView();
- void resize(int width, int height);
+ void resize(uint16_t width, uint16_t height, float pixelRatio);
void notify_map_change(MapChange change, timestamp delay = 0);
void make_active();