diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-05-27 17:54:41 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-06-02 10:38:03 +0200 |
commit | f621603692ccc76c077ba3911048d823f80e4bd5 (patch) | |
tree | 841f78439dc7a262b3a1c9f5fdae7eb57d22b7b8 /src/quick/scenegraph/util | |
parent | 3371e1844c4505ecf8dc2be823e13a2b689bf584 (diff) |
Follow QRhi create-destroy API update
Change-Id: I0bc2cbce373febcb9073f15067eebbc1723462ba
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/quick/scenegraph/util')
-rw-r--r-- | src/quick/scenegraph/util/qsgplaintexture.cpp | 4 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgrhiatlastexture.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/quick/scenegraph/util/qsgplaintexture.cpp b/src/quick/scenegraph/util/qsgplaintexture.cpp index 35d204fed2..55ea0bf181 100644 --- a/src/quick/scenegraph/util/qsgplaintexture.cpp +++ b/src/quick/scenegraph/util/qsgplaintexture.cpp @@ -299,7 +299,7 @@ void QSGPlainTexture::setTextureFromNativeObject(QRhi *rhi, QQuickWindow::Native QRhiTexture *t = rhi->newTexture(QRhiTexture::RGBA8, size, 1, flags); // ownership of the native object is never taken - t->buildFrom({nativeObjectHandle, nativeLayout}); + t->createFrom({nativeObjectHandle, nativeLayout}); setTexture(t); } @@ -438,7 +438,7 @@ void QSGPlainTexture::commitTextureOperations(QRhi *rhi, QRhiResourceUpdateBatch } if (needsRebuild) { - if (!m_texture->build()) { + if (!m_texture->create()) { qWarning("Failed to build texture for QSGPlainTexture (size %dx%d)", m_texture_size.width(), m_texture_size.height()); return; diff --git a/src/quick/scenegraph/util/qsgrhiatlastexture.cpp b/src/quick/scenegraph/util/qsgrhiatlastexture.cpp index e7430a47d4..ce697a13fc 100644 --- a/src/quick/scenegraph/util/qsgrhiatlastexture.cpp +++ b/src/quick/scenegraph/util/qsgrhiatlastexture.cpp @@ -256,7 +256,7 @@ bool Atlas::generateTexture() if (!m_texture) return false; - if (!m_texture->build()) { + if (!m_texture->create()) { delete m_texture; m_texture = nullptr; return false; @@ -442,7 +442,7 @@ QSGTexture *Texture::removedFromAtlas(QRhiResourceUpdateBatch *resourceUpdates) const QRect r = atlasSubRectWithoutPadding(); QRhiTexture *extractTex = rhi->newTexture(m_atlas->texture()->format(), r.size()); - if (extractTex->build()) { + if (extractTex->create()) { bool ownResUpd = false; QRhiResourceUpdateBatch *resUpd = resourceUpdates; if (!resUpd) { |