FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    SkiaOptions

    struct · ferroui-skia · v0.5.0

    struct SkiaOptions
    

    Options for the Skia rendering subsystem.

    View source

    Members

    max_gpu_resource_size_bytes

    max_gpu_resource_size_bytes: Option<i64>
    

    The maximum number of bytes for video memory to store textures and resources.

    128 MiB by default, the budget of the image textures of Vello (upstream's 28 MiB evicted the textures of images that scrolled out of view, which were uploaded again when they came back: docs/porting/gpu-rendering.md, "The image textures of Ganesh"). None means the Skia default.

    Source

    use_opacity_save_layer

    use_opacity_save_layer: bool
    

    Use a save layer to apply opacity, so that every visual is rendered to its own layer when opacity is applied.

    Source

    use_stencil_buffers

    use_stencil_buffers: Option<bool>
    

    Whether Skia may use stencil buffers. Only an explicit Some(true) enables them; see should_avoid_stencil_buffers.

    Source

    prewarm_effect_pipelines

    prewarm_effect_pipelines: bool
    

    Whether a GPU render target makes the GPU pipelines of the effects the themes register (effects::register_effect_prewarm, the acrylic of the WinUI theme) after the first frame of a window, by drawing them once offscreen, rather than when a frame first draws them (#437). On Graphite the pipelines are compiled on a thread of their own, from a recorder of their own; on Ganesh by the render thread, between two frames. true by default (docs/porting/gpu-rendering.md, "Pipelines made ahead of their first draw").

    Source

    frame_pipelining_bands

    frame_pipelining_bands: usize
    

    How many horizontal bands a pipelined frame is divided into (frame_pipelining), each drawn by a thread of its own with a Graphite recorder of its own.

    DEFAULT_FRAME_PIPELINING_BANDS (two) by default; a value outside 1..=``MAX_FRAME_PIPELINING_BANDS is brought into that range. One band draws the whole frame on one thread beside the render thread. More bands spread the recording of a frame over more cores; each band has a glyph atlas of its own and draws what crosses its boundaries once more, and a band is at least 64 pixels high, so a low layer has fewer. The threads are made by the first layer of a GPU context that pipelines a frame, as many as that layer has bands (docs/porting/desktop-performance.md, section 9.33).

    Source

    new

    fn new() -> Self
    

    Creates the default options.

    Source

    effective_frame_pipelining_bands

    fn effective_frame_pipelining_bands(self: &Self) -> usize
    

    The number of bands of a pipelined frame the options ask for: frame_pipelining_bands within 1..=``MAX_FRAME_PIPELINING_BANDS.

    Source

    should_avoid_stencil_buffers

    fn should_avoid_stencil_buffers(use_stencil_buffers: Option<bool>) -> bool
    

    Stencil buffers let Skia choose multisample-based path rendering, which quantizes edge coverage and visibly degrades vector geometry anti-aliasing on GPU backends. They are a performance opt-in, so anything other than an explicit true avoids them.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Clone
    • Copy
    • Debug
    • StructuralPartialEq
    • PartialEq
    • Eq
    • Default

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.