register_effect_prewarm
function · ferroui-base · v0.5.0
fn register_effect_prewarm(name: &str, effect: impl Into<super::GraphicsEffect>, animatable_properties: &[&str]) -> Result<(), super::CompositionEffectFactoryError>
Registers effect (with its animatable properties, as for
Compositor::create_effect_factory_with_properties)
under name for the prewarm of the GPU programs: after a frame, each
composition target that has not drawn it yet draws it once offscreen,
with the values of the description, at its scaling, so that the GPU
backend makes its programs before the first frame that shows it.
The source parameters of the effect are drawn as an image (they are bound to brushes only when the effect is used). A name that is registered already keeps its effect. Fails as the factory of the effect would.
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.