[Qt] Consider pixel ratio in View::getFramebufferSize()

This commit is contained in:
Bruno de Oliveira Abinader
2016-05-23 19:56:41 +03:00
parent 1769e6fcb4
commit 835790d41a

View File

@@ -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()