MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / bloom_begin_drawing

Function bloom_begin_drawing

native/watchos/src/lib.rs:336–346  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

334
335#[no_mangle]
336pub extern "C" fn bloom_begin_drawing() {
337 // Pace the game thread to target fps. Canvas refresh is driven by the
338 // frame counter change on the Swift side, so this sleep also controls
339 // apparent frame rate in the view.
340 let fps = state().target_fps.load(Ordering::Acquire);
341 if fps > 0 {
342 let frame_ns = 1_000_000_000u64 / fps as u64;
343 std::thread::sleep(std::time::Duration::from_nanos(frame_ns));
344 }
345 draw_list::begin();
346}
347
348#[no_mangle]
349pub extern "C" fn bloom_end_drawing() {

Callers

nothing calls this directly

Calls 2

stateFunction · 0.85
beginFunction · 0.85

Tested by

no test coverage detected