31 ~QBackingStoreRhiSupport();
35 void setFormat(
const QSurfaceFormat &format) { m_format = format; }
36 void setWindow(QWindow *window) { m_window = window; }
37 void setConfig(
const QPlatformBackingStoreRhiConfig &config) { m_config = config; }
41 QRhiSwapChain *swapChainForWindow(QWindow *window);
43 static QSurface::SurfaceType surfaceTypeForConfig(
const QPlatformBackingStoreRhiConfig &config);
45 static bool checkForceRhi(QPlatformBackingStoreRhiConfig *outConfig, QSurface::SurfaceType *outType);
47 static QRhi::Implementation apiToRhiBackend(QPlatformBackingStoreRhiConfig::Api api);
49 QRhi *rhi()
const {
return m_rhi; }
52 QSurfaceFormat m_format;
53 QWindow *m_window =
nullptr;
54 QPlatformBackingStoreRhiConfig m_config;
55 QRhi *m_rhi =
nullptr;
56 QOffscreenSurface *m_openGLFallbackSurface =
nullptr;
57 struct SwapchainData {
58 QRhiSwapChain *swapchain =
nullptr;
59 QRhiRenderPassDescriptor *renderPassDescriptor =
nullptr;
60 QObject *windowWatcher =
nullptr;
63 QHash<QWindow *, SwapchainData> m_swapchains;
64 friend class QBackingStoreRhiSupportWindowWatcher;