Set dpr of QImage in QOpenGLWidget grabFramebuffer

The QImage returned from grabFramebuffer should have the dpr of the
source.

Change-Id: Iafeabc1ab4e032fc28b73307104917ba3e898ad5
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
Dyami Caliri 2015-02-02 12:43:59 -08:00
parent 5bd41b850f
commit a2bcf43eb9

View File

@ -758,6 +758,7 @@ QImage QOpenGLWidgetPrivate::grabFramebuffer()
resolveSamples();
q->makeCurrent();
QImage res = qt_gl_read_framebuffer(q->size() * q->devicePixelRatio(), false, false);
res.setDevicePixelRatio(q->devicePixelRatio());
return res;
}