aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/util/qsgrhiatlastexture.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-04-07 15:38:51 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-04-16 09:59:15 +0200
commit3768ec496cb8be1b8bedafd08c19732a405dfeea (patch)
treec35780a359ebf600e489c8d4369929d00b308644 /src/quick/scenegraph/util/qsgrhiatlastexture.cpp
parentbc1b6e73bb31c7eb9b9f6b4920d2e99ac441bc08 (diff)
Add argument to QSGTexture::removedFromAtlas()
...as requested by the Qt 6 TODO. To preserve binary (and source) compatibility in 5.14, the argument was changed into a variable in QSGTexturePrivate, with a public setter. This can now go away and the signature of removedFromAtlas() can get updated. Task-number: QTBUG-82997 Change-Id: I930c0014712c78e140b778b6e9a4d8b92c5bdc8c Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/scenegraph/util/qsgrhiatlastexture.cpp')
-rw-r--r--src/quick/scenegraph/util/qsgrhiatlastexture.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/quick/scenegraph/util/qsgrhiatlastexture.cpp b/src/quick/scenegraph/util/qsgrhiatlastexture.cpp
index ec92666f0d..75577a9bd8 100644
--- a/src/quick/scenegraph/util/qsgrhiatlastexture.cpp
+++ b/src/quick/scenegraph/util/qsgrhiatlastexture.cpp
@@ -392,12 +392,6 @@ TextureBase::~TextureBase()
m_atlas->remove(this);
}
-QRhiResourceUpdateBatch *TextureBase::workResourceUpdateBatch() const
-{
- Q_D(const TextureBase);
- return d->workResourceUpdateBatch;
-}
-
int TextureBase::comparisonKey() const
{
// We need special care here: a typical comparisonKey() implementation
@@ -447,7 +441,7 @@ Texture::~Texture()
delete m_nonatlas_texture;
}
-QSGTexture *Texture::removedFromAtlas() const
+QSGTexture *Texture::removedFromAtlas(QRhiResourceUpdateBatch *resourceUpdates) const
{
if (!m_nonatlas_texture) {
m_nonatlas_texture = new QSGPlainTexture;
@@ -463,7 +457,7 @@ QSGTexture *Texture::removedFromAtlas() const
QRhiTexture *extractTex = rhi->newTexture(m_atlas->texture()->format(), r.size());
if (extractTex->build()) {
bool ownResUpd = false;
- QRhiResourceUpdateBatch *resUpd = workResourceUpdateBatch(); // ### Qt 6: should be an arg to this function
+ QRhiResourceUpdateBatch *resUpd = resourceUpdates;
if (!resUpd) {
ownResUpd = true;
resUpd = rhi->nextResourceUpdateBatch();