| 1754 | engine().profiler.avg_frame_gpu_us() |
| 1755 | } |
| 1756 | #[no_mangle] pub extern "C" fn bloom_print_profiler_summary() { |
| 1757 | // Android has no stdout — log the summary via android_log so |
| 1758 | // `adb logcat` picks it up alongside the rest of the engine log. |
| 1759 | // %s + ptr variant so `%` characters in the summary (none today, |
| 1760 | // but cheap safety) aren't interpreted as format specifiers. |
| 1761 | let summary = engine().profiler.summary(); |
| 1762 | if let Ok(c) = std::ffi::CString::new(summary) { |
| 1763 | unsafe { |
| 1764 | __android_log_print( |
| 1765 | 4, |
| 1766 | b"BloomEngine\0".as_ptr(), |
| 1767 | b"%s\0".as_ptr(), |
| 1768 | c.as_ptr(), |
| 1769 | ); |
| 1770 | } |
| 1771 | } |
| 1772 | } |
| 1773 | |
| 1774 | // ============================================================ |
| 1775 | // Physics (Jolt 5.x) — FFI surface generated from shared macro |