rhi: metal: Configure the layer's opaque property as appropriate
Task-number: QTBUG-78089 Change-Id: I6cd95e24d38562cf1931c107bb6b719e340583a8 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
This commit is contained in:
parent
ef78a2e8f9
commit
3d7207414b
@ -3596,6 +3596,18 @@ bool QMetalSwapChain::buildOrResize()
|
||||
}
|
||||
#endif
|
||||
|
||||
if (m_flags.testFlag(SurfaceHasPreMulAlpha)) {
|
||||
d->layer.opaque = NO;
|
||||
} else if (m_flags.testFlag(SurfaceHasNonPreMulAlpha)) {
|
||||
// The CoreAnimation compositor is said to expect premultiplied alpha,
|
||||
// so this is then wrong when it comes to the blending operations but
|
||||
// there's nothing we can do. Fortunately Qt Quick always outputs
|
||||
// premultiplied alpha so it is not a problem there.
|
||||
d->layer.opaque = NO;
|
||||
} else {
|
||||
d->layer.opaque = YES;
|
||||
}
|
||||
|
||||
m_currentPixelSize = surfacePixelSize();
|
||||
pixelSize = m_currentPixelSize;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user