diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-04-07 16:02:10 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-04-28 11:46:27 +0200 |
commit | d59e12a329e6a2127fd43e438cbfe9f750c646fc (patch) | |
tree | 58b3ea6c94cfcc26f6e473145b7dabccdcec3bea /src/quick/scenegraph/compressedtexture/qsgcompressedtexture_p.h | |
parent | c2de5643cd4f1b8d8b10e2bb62fdf95f12fdd9e3 (diff) |
Move updateRhiTexture and co. to QSGTexture
Use a more descriptive name, commitTextureOperations() in order to avoid
confusion with QSGDynamicTexture::updateTexture() which has nothing to
do with this.
With this the QSGTexture interface has all 5.14 pending changes done
(changes that were plumbed via ugly hacks due to having had to deal with
binary compatibility). The awful enforcing of subclassing QSGTexturePrivate
for each and every QSGTexture subclass is now eliminated.
Purging the direct OpenGL code path will involve removing QSGTexture functions
like textureId(), bind(), updateBindOptions(). With this patch we now we have all
the equivalents (or, in some cases, spiritual successors) in place.
Task-number: QTBUG-82997
Change-Id: I7a831f982070c52abc7a36604130a1110d14ff9c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/scenegraph/compressedtexture/qsgcompressedtexture_p.h')
-rw-r--r-- | src/quick/scenegraph/compressedtexture/qsgcompressedtexture_p.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/quick/scenegraph/compressedtexture/qsgcompressedtexture_p.h b/src/quick/scenegraph/compressedtexture/qsgcompressedtexture_p.h index 084205c5b5..d584f0e2d4 100644 --- a/src/quick/scenegraph/compressedtexture/qsgcompressedtexture_p.h +++ b/src/quick/scenegraph/compressedtexture/qsgcompressedtexture_p.h @@ -59,11 +59,8 @@ QT_BEGIN_NAMESPACE -class QSGCompressedTexturePrivate; - class Q_QUICK_PRIVATE_EXPORT QSGCompressedTexture : public QSGTexture { - Q_DECLARE_PRIVATE(QSGCompressedTexture) Q_OBJECT public: QSGCompressedTexture(const QTextureFileData& texData); @@ -76,6 +73,8 @@ public: int comparisonKey() const override; int textureId() const override; void bind() override; + QRhiTexture *rhiTexture() const override; + void commitTextureOperations(QRhi *rhi, QRhiResourceUpdateBatch *resourceUpdates) override; QTextureFileData textureData() const; @@ -94,14 +93,6 @@ namespace QSGOpenGLAtlasTexture { class Manager; } -class QSGCompressedTexturePrivate : public QSGTexturePrivate -{ - Q_DECLARE_PUBLIC(QSGCompressedTexture) -public: - QRhiTexture *rhiTexture() const override; - void updateRhiTexture(QRhi *rhi, QRhiResourceUpdateBatch *resourceUpdates) override; -}; - class Q_QUICK_PRIVATE_EXPORT QSGCompressedTextureFactory : public QQuickTextureFactory { public: |