MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / native_frame_callback

Function native_frame_callback

packages/server/src/simulators/session.rs:416–429  ·  view source on GitHub ↗
(
    frame: *const ffi::xcw_native_frame,
    user_data: *mut c_void,
)

Source from the content-addressed store, hash-verified

414}
415
416unsafe extern "C" fn native_frame_callback(
417 frame: *const ffi::xcw_native_frame,
418 user_data: *mut c_void,
419) {
420 if frame.is_null() || user_data.is_null() {
421 return;
422 }
423
424 let weak = Weak::from_raw(user_data as *const SimulatorSessionInner);
425 if let Some(inner) = weak.upgrade() {
426 inner.handle_frame(&*frame);
427 }
428 let _ = Weak::into_raw(weak);
429}
430
431impl SimulatorSessionInner {
432 fn start_refresh_pump(self: &Arc<Self>) {

Callers

nothing calls this directly

Calls 1

handle_frameMethod · 0.80

Tested by

no test coverage detected