diff options
Diffstat (limited to 'src/gui/painting/qplatformbackingstore.h')
-rw-r--r-- | src/gui/painting/qplatformbackingstore.h | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/src/gui/painting/qplatformbackingstore.h b/src/gui/painting/qplatformbackingstore.h index bfb40fe5e0..1d55e9ab6a 100644 --- a/src/gui/painting/qplatformbackingstore.h +++ b/src/gui/painting/qplatformbackingstore.h @@ -23,7 +23,7 @@ QT_BEGIN_NAMESPACE -Q_GUI_EXPORT Q_DECLARE_LOGGING_CATEGORY(lcQpaBackingStore) +Q_DECLARE_EXPORTED_LOGGING_CATEGORY(lcQpaBackingStore, Q_GUI_EXPORT) class QRegion; class QRect; @@ -36,7 +36,6 @@ class QPlatformGraphicsBuffer; class QRhi; class QRhiTexture; class QRhiResourceUpdateBatch; -class QRhiSwapChain; struct Q_GUI_EXPORT QPlatformBackingStoreRhiConfig { @@ -45,6 +44,7 @@ struct Q_GUI_EXPORT QPlatformBackingStoreRhiConfig Metal, Vulkan, D3D11, + D3D12, Null }; @@ -66,22 +66,10 @@ struct Q_GUI_EXPORT QPlatformBackingStoreRhiConfig bool isDebugLayerEnabled() const { return m_debugLayer; } void setDebugLayer(bool enable) { m_debugLayer = enable; } - QByteArrayList instanceExtensions() const { return m_instanceExtensions; } - void setInstanceExtensions(const QByteArrayList &e) { m_instanceExtensions = e; } - - QByteArrayList instanceLayers() const { return m_instanceLayers; } - void setInstanceLayers(const QByteArrayList &e) { m_instanceLayers = e; } - - QByteArrayList deviceExtensions() const { return m_deviceExtensions; } - void setDeviceExtensions(const QByteArrayList &e) { m_deviceExtensions = e; } - private: bool m_enable; Api m_api = Null; bool m_debugLayer = false; - QByteArrayList m_instanceExtensions; - QByteArrayList m_instanceLayers; - QByteArrayList m_deviceExtensions; friend bool operator==(const QPlatformBackingStoreRhiConfig &a, const QPlatformBackingStoreRhiConfig &b); }; @@ -89,10 +77,7 @@ inline bool operator==(const QPlatformBackingStoreRhiConfig &a, const QPlatformB { return a.m_enable == b.m_enable && a.m_api == b.m_api - && a.m_debugLayer == b.m_debugLayer - && a.m_instanceExtensions == b.m_instanceExtensions - && a.m_instanceLayers == b.m_instanceLayers - && a.m_deviceExtensions == b.m_deviceExtensions; + && a.m_debugLayer == b.m_debugLayer; } inline bool operator!=(const QPlatformBackingStoreRhiConfig &a, const QPlatformBackingStoreRhiConfig &b) @@ -108,7 +93,8 @@ public: enum Flag { StacksOnTop = 0x01, TextureIsSrgb = 0x02, - NeedsPremultipliedAlphaBlending = 0x04 + NeedsPremultipliedAlphaBlending = 0x04, + MirrorVertically = 0x08 }; Q_DECLARE_FLAGS(Flags, Flag) @@ -118,6 +104,7 @@ public: int count() const; bool isEmpty() const { return count() == 0; } QRhiTexture *texture(int index) const; + QRhiTexture *textureExtra(int index) const; QRect geometry(int index) const; QRect clipRect(int index) const; void *source(int index); @@ -127,6 +114,9 @@ public: void appendTexture(void *source, QRhiTexture *texture, const QRect &geometry, const QRect &clipRect = QRect(), Flags flags = { }); + + void appendTexture(void *source, QRhiTexture *textureLeft, QRhiTexture *textureRight, const QRect &geometry, + const QRect &clipRect = QRect(), Flags flags = { }); void clear(); Q_SIGNALS: @@ -154,6 +144,7 @@ public: virtual void flush(QWindow *window, const QRegion ®ion, const QPoint &offset); virtual FlushResult rhiFlush(QWindow *window, + qreal sourceDevicePixelRatio, const QRegion ®ion, const QPoint &offset, QPlatformTextureList *textures, @@ -182,7 +173,6 @@ public: void setRhiConfig(const QPlatformBackingStoreRhiConfig &config); QRhi *rhi() const; - QRhiSwapChain *rhiSwapChain() const; void surfaceAboutToBeDestroyed(); void graphicsDeviceReportedLost(); |