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