diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-07-04 13:38:06 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-07-04 13:04:09 +0000 |
commit | 8438867768f819a8cb60ae93ad2a5c8f500ff763 (patch) | |
tree | e59891240fa9f4b7f2a07de3daeb8b5ece878425 /src/runtime/q3dsuippresentation_p.h | |
parent | f40071655e114d0161908b2c2c4617d1102389b3 (diff) |
Fix premul alpha handling for images
Assume non-premultiplied alpha which is the common case for regular
image files (we do not explicitly convert to ARGB32_Premultiplied or
such and therefore the image data is non-premultiplied in most cases
(except of course when the user explicitly creates an image with premul
alpha but we cannot do much about that)).
When using subpresentations as texture maps, premultiplied alpha is
assumed to be true since this is what both the layer compositor and
Qt Quick output. This is the only case for a premultiplied image source
(for now?).
This cleans up a number of todo notes in the source.
Task-number: QT3DS-1982
Change-Id: I73578da11a6e393bcbe467fce883478f54b1f5ef
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/runtime/q3dsuippresentation_p.h')
-rw-r--r-- | src/runtime/q3dsuippresentation_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/q3dsuippresentation_p.h b/src/runtime/q3dsuippresentation_p.h index 18c45d4..50cd1e7 100644 --- a/src/runtime/q3dsuippresentation_p.h +++ b/src/runtime/q3dsuippresentation_p.h @@ -787,6 +787,7 @@ public: const QMatrix4x4 &textureTransform() const { return m_textureTransform; } bool hasTransparency(Q3DSUipPresentation *presentation); + bool hasPremultipliedAlpha() const; // Properties QString sourcePath() const { return m_sourcePath; } // already adjusted, can be opened as-is |