summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-05-23 19:56:41 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-05-24 19:58:24 +0300
commit835790d41a39663cb0ef17f0ff8a7285cbdc94fd (patch)
tree036334c324e3fcaacf9d68a336a231b9b0fab815
parent1769e6fcb42d41e042c488bf2023fed360b87357 (diff)
downloadqtlocation-mapboxgl-835790d41a39663cb0ef17f0ff8a7285cbdc94fd.tar.gz
[Qt] Consider pixel ratio in View::getFramebufferSize()
-rw-r--r--platform/qt/src/qmapboxgl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/qt/src/qmapboxgl.cpp b/platform/qt/src/qmapboxgl.cpp
index 32e0f43c8d..e901f6fcd4 100644
--- a/platform/qt/src/qmapboxgl.cpp
+++ b/platform/qt/src/qmapboxgl.cpp
@@ -656,7 +656,12 @@ std::array<uint16_t, 2> QMapboxGLPrivate::getSize() const
std::array<uint16_t, 2> QMapboxGLPrivate::getFramebufferSize() const
{
+#if QT_VERSION >= 0x050000
+ return {{ static_cast<uint16_t>(size.width() * qApp->devicePixelRatio()),
+ static_cast<uint16_t>(size.height() * qApp->devicePixelRatio()) }};
+#else
return getSize();
+#endif
}
void QMapboxGLPrivate::invalidate()