effect: Allocate an offscreen fbo with correct scale in OffscreenQuickView

QQuickWindow::effectiveDevicePixelRatio() uses the device pixel ratio
of the attached QQuickRenderTarget. Instead, the scale factor of the
output should be used, which is what QWindow::devicePixelRatio() returns.
This commit is contained in:
Vlad Zahorodnii 2024-01-25 12:19:57 +02:00
parent 75b08a8fd9
commit 601d33f294

View file

@ -213,7 +213,7 @@ void OffscreenQuickView::update()
return;
}
const QSize nativeSize = d->m_view->size() * d->m_view->effectiveDevicePixelRatio();
const QSize nativeSize = d->m_view->size() * d->m_view->devicePixelRatio();
if (!d->m_fbo || d->m_fbo->size() != nativeSize) {
d->m_textureExport.reset(nullptr);