[CA_COLOR_OPAQUE] things that make a layer non-opaque. scaled CAGradientLayer?
- by mahal tertin
i spent some time with the environment variable CA_COLOR_OPAQUE = 1 and have my findings to share.
things that make a CALayer non-opaque (slow, more memory, ...):
* contents with alpha (like an NSImage with an icon)
* NSImage/CGImage from a pdf as contents (even when the pdf does not contain any alpha and opaque=YES)
* backgroundColor = nil
* CATextLayer with text in a (because it is contents with alpha)
* rounded corners? maybe/sometimes
* masksToBounds? not necessarily
as we scale most of tree with CATransform3DScale on sublayerTransform i found also these rather irritating non-opaque:
* CAGradientLayer that is somewhere down in this scaled tree (even when set all the gradient colors without alpha)
* edgeAntialiasingMask != 0 of a layer that is somewhere down in this scaled tree
the last two do not make sense to me. why should it be non opaque? what do i see?
if anyone has any thoughts on these findings, i'm happy to learn as i couldn't find such a list yet.