19void QRhiBackingStore::flush(QWindow *flushedWindow,
const QRegion ®ion,
const QPoint &offset)
24 if (!rhi(flushedWindow)) {
25 QPlatformBackingStoreRhiConfig rhiConfig;
26 switch (flushedWindow->surfaceType()) {
27 case QSurface::OpenGLSurface:
28 rhiConfig.setApi(QPlatformBackingStoreRhiConfig::OpenGL);
30 case QSurface::MetalSurface:
31 rhiConfig.setApi(QPlatformBackingStoreRhiConfig::Metal);
33 case QSurface::Direct3DSurface:
34 rhiConfig.setApi(QPlatformBackingStoreRhiConfig::D3D11);
36 case QSurface::VulkanSurface:
37 rhiConfig.setApi(QPlatformBackingStoreRhiConfig::Vulkan);
43 rhiConfig.setEnabled(
true);
44 createRhi(flushedWindow, rhiConfig);
49 const qreal sourceDevicePixelRatio = window()->devicePixelRatio();
56 const qreal sourceTransformFactor = flushedWindow->handle()->devicePixelRatio();
58 static QPlatformTextureList emptyTextureList;
59 bool translucentBackground = m_image.hasAlphaChannel();
60 rhiFlush(flushedWindow, sourceDevicePixelRatio,
61 region, offset, &emptyTextureList, translucentBackground,
62 sourceTransformFactor);