diff options
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qglframebufferobject.cpp | 3 | ||||
-rw-r--r-- | src/opengl/qglpaintdevice.cpp | 2 | ||||
-rw-r--r-- | src/opengl/qglpixelbuffer.cpp | 3 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index 15880108f3..1c802cabcb 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -1232,6 +1232,9 @@ int QGLFramebufferObject::metric(PaintDeviceMetric metric) const case PdmPhysicalDpiY: return qRound(dpmy * 0.0254); + case QPaintDevice::PdmDevicePixelRatio: + return 1; + default: qWarning("QGLFramebufferObject::metric(), Unhandled metric type: %d.\n", metric); break; diff --git a/src/opengl/qglpaintdevice.cpp b/src/opengl/qglpaintdevice.cpp index a3779218d2..ef9bdba070 100644 --- a/src/opengl/qglpaintdevice.cpp +++ b/src/opengl/qglpaintdevice.cpp @@ -67,6 +67,8 @@ int QGLPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const const QGLFormat f = format(); return f.redBufferSize() + f.greenBufferSize() + f.blueBufferSize() + f.alphaBufferSize(); } + case PdmDevicePixelRatio: + return 1; default: qWarning("QGLPaintDevice::metric() - metric %d not known", metric); return 0; diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp index e514e34552..e5e7de0fff 100644 --- a/src/opengl/qglpixelbuffer.cpp +++ b/src/opengl/qglpixelbuffer.cpp @@ -462,6 +462,9 @@ int QGLPixelBuffer::metric(PaintDeviceMetric metric) const case PdmPhysicalDpiY: return qRound(dpmy * 0.0254); + case QPaintDevice::PdmDevicePixelRatio: + return 1; + default: qWarning("QGLPixelBuffer::metric(), Unhandled metric type: %d\n", metric); break; |