summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglpaintdevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qglpaintdevice.cpp')
-rw-r--r--src/opengl/qglpaintdevice.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/opengl/qglpaintdevice.cpp b/src/opengl/qglpaintdevice.cpp
index ef9bdba070..6a8d5c042e 100644
--- a/src/opengl/qglpaintdevice.cpp
+++ b/src/opengl/qglpaintdevice.cpp
@@ -44,6 +44,7 @@
#include <private/qglpixelbuffer_p.h>
#include <private/qglframebufferobject_p.h>
#include <qopenglfunctions.h>
+#include <qwindow.h>
QT_BEGIN_NAMESPACE
@@ -188,7 +189,12 @@ void QGLWidgetGLPaintDevice::endPaint()
QSize QGLWidgetGLPaintDevice::size() const
{
+#ifdef Q_OS_MAC
+ return glWidget->size() * (glWidget->windowHandle() ?
+ glWidget->windowHandle()->devicePixelRatio() : qApp->devicePixelRatio());
+#else
return glWidget->size();
+#endif
}
QGLContext* QGLWidgetGLPaintDevice::context() const