FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ICompositionImportableSharedGpuContextImage

    trait · ferroui-base · v0.5.0

    trait ICompositionImportableSharedGpuContextImage: Send + Sync
    

    An GPU image descriptor obtained from a context from the same share group as one used by the compositor

    The image is shared between two threads, as upstream, where that is a convention: the thread of the caller makes it, keeps it and disposes it, and the thread that renders reads it during the import and may dispose it with the imported image. Here the type says so: what both threads read is a plain value or is behind a lock, and what belongs to the context of the caller (the context itself) is bound to its thread inside the implementation and is not touched from the other one.

    View source

    Members

    dispose

    fn dispose(self: &Self)
    

    Releases the image. Either thread may call it, more than once.

    Source

    as_any

    fn as_any(self: &Self) -> &dyn std::any::Any
    

    Lets the backend that made the image recover its concrete type (the cast upstream performs on the image it is asked to import).

    Source

    Availability

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