diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2018-12-18 07:58:34 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2018-12-19 16:40:58 +0000 |
commit | aaedd1f71b7a7e4410966041baba0f392644e482 (patch) | |
tree | 8248235681408de5d60a0cb57053237eec37296d /src/render/texture/qtexturedata.cpp | |
parent | d85eede12eeab74ae446a2db4b12e23a846d0502 (diff) |
Texture: initialize internal format to NoFormat
Format was initialized to RGBA8_UNorm on TextureProperties.
This had the side effect that if you created a TextureLoader entry
with no source yet set, the backend would try to load and return
early since no texture data had yet been generated. Yet it would still
send a notification change with the format (which was RGBA8_UNorm
instead of NoFormat) back to the frontend QTextureLoader. This would
prevent the QTextureLoader from later being loaded correctly with the
format actually read from the image file.
Also updated QTextureData/QTextureImageData/QTextureFromSourceLoader
for consistency.
Change-Id: I23e2287fac297b9b8901476715b1bc1e78c6342b
Task-number: QTBUG-72651
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Diffstat (limited to 'src/render/texture/qtexturedata.cpp')
-rw-r--r-- | src/render/texture/qtexturedata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render/texture/qtexturedata.cpp b/src/render/texture/qtexturedata.cpp index b7bb75242..ac4ca80c0 100644 --- a/src/render/texture/qtexturedata.cpp +++ b/src/render/texture/qtexturedata.cpp @@ -57,7 +57,7 @@ class QTextureDataPrivate { public: QAbstractTexture::Target m_target; - QAbstractTexture::TextureFormat m_format; + QAbstractTexture::TextureFormat m_format = QAbstractTexture::NoFormat; int m_width = 0; int m_height = 0; int m_depth = 0; |