()
| 2487 | |
| 2488 | #[no_mangle] |
| 2489 | pub extern "C" fn bloom_profiler_overlay_text() -> *const u8 { |
| 2490 | let snap = engine().profiler.snapshot(); |
| 2491 | let mut s = String::with_capacity(snap.len() * 48); |
| 2492 | for (label, cpu, gpu) in &snap { |
| 2493 | s.push_str(label); |
| 2494 | s.push('|'); |
| 2495 | s.push_str(&format!("{:.2}", cpu)); |
| 2496 | s.push('|'); |
| 2497 | match gpu { |
| 2498 | Some(g) => s.push_str(&format!("{:.2}", g)), |
| 2499 | None => s.push_str("-1"), |
| 2500 | } |
| 2501 | s.push('\n'); |
| 2502 | } |
| 2503 | alloc_perry_string(&s) |
| 2504 | } |
| 2505 | |
| 2506 | #[no_mangle] |
| 2507 | pub extern "C" fn bloom_register_frame_callback(priority: f64, callback: extern "C" fn(f64)) -> f64 { |
no test coverage detected