summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntti Määttä <antti.maatta@qt.io>2020-01-08 12:21:07 +0200
committerAntti Määttä <antti.maatta@qt.io>2020-01-10 15:05:02 +0200
commit123b10c936be30e07ee6983caaa86604b033ca65 (patch)
tree7514a0ab8b83bc366260b5e08778524842df4442
parentc88b250e2fc6b6cdb397747860bab18900fe9219 (diff)
Always write BufferData elements
This prevents scanning opaque textures for transparency in runtime. Task-number: QT3DS-4026 Change-Id: I4e4971aa63218151200a187269c84366656d3022 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r--src/Authoring/Client/Code/Core/Doc/Doc.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/Doc.cpp b/src/Authoring/Client/Code/Core/Doc/Doc.cpp
index e1ed2bb0..f321541d 100644
--- a/src/Authoring/Client/Code/Core/Doc/Doc.cpp
+++ b/src/Authoring/Client/Code/Core/Doc/Doc.cpp
@@ -2546,14 +2546,12 @@ void CDoc::SavePresentationFile(CBufferedOutputStream *inOutputStream)
IDOMWriter::Scope __BufferData(theWriter, L"BufferData");
for (size_t idx = 0, end = theImageBuffers.size(); idx < end; ++idx) {
SImageTextureData theBuffer = theImageBuffers[idx].second;
- if (theBuffer.m_TextureFlags.HasTransparency()) {
- IDOMWriter::Scope __ImageScope(theWriter, L"ImageBuffer");
- theWriter.Att(L"sourcepath", theImageBuffers[idx].first.c_str());
- // Writing boolean in wide text results just in "T" or "F" on Linux
- theWriter.Att("hasTransparency", true);
- if (theBuffer.m_TextureFlags.HasOpaquePixels())
- theWriter.Att("hasOpaquePixels", true);
- }
+ IDOMWriter::Scope __ImageScope(theWriter, L"ImageBuffer");
+ theWriter.Att(L"sourcepath", theImageBuffers[idx].first.c_str());
+ // Writing boolean in wide text results just in "T" or "F" on Linux
+ theWriter.Att("hasTransparency", theBuffer.m_TextureFlags.HasTransparency());
+ if (theBuffer.m_TextureFlags.HasOpaquePixels())
+ theWriter.Att("hasOpaquePixels", true);
}
}
}