Expand description
Rules for when a graphics layer is drawn into its own offscreen buffer and with which alpha.
Structs§
- Layer
Isolation - What a layer needs to be composited from its own offscreen buffer.
Functions§
- effective_
layer_ isolation - Returns what
layerneeds to be composited from its own buffer, orNonewhen it can be drawn directly. - folded_
layer_ alpha - The alpha
layer’s content draws with when the layer is drawn in place: its own, or the 8-bit alpha of the isolated composite it needs. - layer_
composite_ params - The composite alpha and blend mode an isolated layer contributes at its parent, for callers that never read the isolation’s render effect and would otherwise deep-clone it once per layer per frame.
- layer_
for_ content - Returns the layer to draw the content with inside the offscreen buffer:
layerwith its alpha reset to one whenisolationmoves the alpha to the composite step. - layer_
requires_ isolation - Whether
layermust be drawn into an offscreen buffer first, given its compositing strategy, effect, blend mode and alpha. - local_
content_ layer_ for - The alpha and colour filter of
layer_for_content(layer, isolation)folded in place, without building it. The content layer differs fromlayeronly in the alpha the isolation moves to the composite step, and only that alpha and the colour filter pass to the content, so the two clones the composed form performs — oneGraphicsLayer, oneRenderEffect— are pure waste.