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.
wilder/Plasma/6.2
Vlad Zahorodnii 2 years ago
parent 75b08a8fd9
commit 601d33f294
  1. 2
      src/effect/offscreenquickview.cpp

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

Loading…
Cancel
Save