20void QRhiBackingStore::flush(QWindow *flushedWindow,
const QRegion ®ion,
const QPoint &offset)
25 if (!rhi(flushedWindow)) {
26 QPlatformBackingStoreRhiConfig rhiConfig;
27 switch (flushedWindow->surfaceType()) {
28 case QSurface::OpenGLSurface:
29 rhiConfig.setApi(QPlatformBackingStoreRhiConfig::OpenGL);
31 case QSurface::MetalSurface:
32 rhiConfig.setApi(QPlatformBackingStoreRhiConfig::Metal);
34 case QSurface::Direct3DSurface:
35 rhiConfig.setApi(QPlatformBackingStoreRhiConfig::D3D11);
37 case QSurface::VulkanSurface:
38 rhiConfig.setApi(QPlatformBackingStoreRhiConfig::Vulkan);
44 rhiConfig.setEnabled(
true);
45 createRhi(flushedWindow, rhiConfig);
50 const qreal sourceDevicePixelRatio = window()->devicePixelRatio();
57 const qreal sourceTransformFactor = flushedWindow->handle()->devicePixelRatio();
59 static QPlatformTextureList emptyTextureList;
60 bool translucentBackground = m_image.hasAlphaChannel();
61 rhiFlush(flushedWindow, sourceDevicePixelRatio,
62 region, offset, &emptyTextureList, translucentBackground,
63 sourceTransformFactor);