INNER CODE UNIT · Rust

load

denialwm/denial · compositor/flutter-engine/src/lib.rs:237

    pub fn load(path: impl AsRef<Path>) -> Result<Self, LoadError> {
        let path = path.as_ref();
        // SAFETY: the library stays owned by `EngineLibrary` for longer than
        // every copied function pointer in its proc table.
        let library = unsafe { Library::new(path) }.map_err(|source| LoadError::Library {
            path: path.to_owned(),
            source,
        })?;
        type GetProcAddresses =
            unsafe extern "C" fn(*mut sys::FlutterEngineProcTable) -> sys::FlutterEngineResult;
        // SAFETY: the symbol name and signature come from the versioned
        // Flutter embedder bindings generated for this engine revision.
        let get_proc_addresses = unsafe {
            *library
                .get::<GetProcAddresses>(b"FlutterEngineGetProcAddresses\0")
                .map_err(LoadError::Symbol)?
        };
        type RequestFrameForExternalTextures =

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…