summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhi_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-05-27 17:44:49 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-05-28 17:53:32 +0200
commit56977990e04efa051b1ebd4ce9274d6b69c7bd0c (patch)
treeeaa66635b67faaf94df7b0670fa9e0971268a936 /src/gui/rhi/qrhi_p.h
parentc991d87ee2c239fedb77f76f25936dddf5eb5982 (diff)
rhi: Harmonize create-destroy API pattern with the rest of Qt
For historical reasons we use build and release instead of create and destroy. This becomes confusing now that more modules in Qt start taking QRhi into use. Migrate to the more familiar naming, so those who have used QWindow or QOpenGLContext before will find it natural. Change-Id: I05eb2243ce274c59b03a5f8bcbb2792a4f37120f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhi_p.h')
-rw-r--r--src/gui/rhi/qrhi_p.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/gui/rhi/qrhi_p.h b/src/gui/rhi/qrhi_p.h
index a031ea4f4b..bd476c3927 100644
--- a/src/gui/rhi/qrhi_p.h
+++ b/src/gui/rhi/qrhi_p.h
@@ -658,8 +658,9 @@ public:
virtual Type resourceType() const = 0;
- virtual void release() = 0;
- void releaseAndDestroyLater();
+ virtual void destroy() = 0;
+
+ void deleteLater();
QByteArray name() const;
void setName(const QByteArray &name);
@@ -708,7 +709,7 @@ public:
int size() const { return m_size; }
void setSize(int sz) { m_size = sz; }
- virtual bool build() = 0;
+ virtual bool create() = 0;
virtual NativeBuffer nativeBuffer();
@@ -801,9 +802,9 @@ public:
int sampleCount() const { return m_sampleCount; }
void setSampleCount(int s) { m_sampleCount = s; }
- virtual bool build() = 0;
+ virtual bool create() = 0;
virtual NativeTexture nativeTexture();
- virtual bool buildFrom(NativeTexture src);
+ virtual bool createFrom(NativeTexture src);
virtual void setNativeLayout(int layout);
protected:
@@ -866,7 +867,7 @@ public:
CompareOp textureCompareOp() const { return m_compareOp; }
void setTextureCompareOp(CompareOp op) { m_compareOp = op; }
- virtual bool build() = 0;
+ virtual bool create() = 0;
protected:
QRhiSampler(QRhiImplementation *rhi,
@@ -908,7 +909,7 @@ public:
Flags flags() const { return m_flags; }
void setFlags(Flags h) { m_flags = h; }
- virtual bool build() = 0;
+ virtual bool create() = 0;
virtual QRhiTexture::Format backingFormat() const = 0;
@@ -972,7 +973,7 @@ public:
virtual QRhiRenderPassDescriptor *newCompatibleRenderPassDescriptor() = 0;
- virtual bool build() = 0;
+ virtual bool create() = 0;
protected:
QRhiTextureRenderTarget(QRhiImplementation *rhi, const QRhiTextureRenderTargetDescription &desc_, Flags flags_);
@@ -1001,7 +1002,7 @@ public:
bool isLayoutCompatible(const QRhiShaderResourceBindings *other) const;
- virtual bool build() = 0;
+ virtual bool create() = 0;
protected:
QRhiShaderResourceBindings(QRhiImplementation *rhi);
@@ -1202,7 +1203,7 @@ public:
QRhiRenderPassDescriptor *renderPassDescriptor() const { return m_renderPassDesc; }
void setRenderPassDescriptor(QRhiRenderPassDescriptor *desc) { m_renderPassDesc = desc; }
- virtual bool build() = 0;
+ virtual bool create() = 0;
protected:
QRhiGraphicsPipeline(QRhiImplementation *rhi);
@@ -1269,7 +1270,7 @@ public:
virtual QRhiRenderTarget *currentFrameRenderTarget() = 0;
virtual QSize surfacePixelSize() = 0;
virtual QRhiRenderPassDescriptor *newCompatibleRenderPassDescriptor() = 0;
- virtual bool buildOrResize() = 0;
+ virtual bool createOrResize() = 0;
protected:
QRhiSwapChain(QRhiImplementation *rhi);
@@ -1287,7 +1288,7 @@ class Q_GUI_EXPORT QRhiComputePipeline : public QRhiResource
{
public:
QRhiResource::Type resourceType() const override;
- virtual bool build() = 0;
+ virtual bool create() = 0;
QRhiShaderStage shaderStage() const { return m_shaderStage; }
void setShaderStage(const QRhiShaderStage &stage) { m_shaderStage = stage; }