host: split src/host/main.cpp into translation units

main.cpp (4.5k lines) -> main.cpp (entry, args, synthetic benchmark) plus
vulkan_window, live_client, frame_policy, native_audio, texture_decode,
render_state, input_keymap, host_util. Bodies are moved verbatim; multi-line
VulkanWindow / NativeAudioEngine / FrameRatePolicy members are defined out of
line; one-line accessors stay inline. Anonymous namespace -> mt_host.

No behavior change: ctest 15/15, port_gate macos+android PASS, desktop
--live-client login screen and synthetic --draws runs unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-29 19:30:44 +09:00
co-authored by Claude Opus 5.5
parent a46093104c
commit 75d2dd8545
23 changed files with 4729 additions and 4271 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
// frame budget, so the governor raises the clocks before a frame misses instead of idling the CPU at
// its lowest step between short bursts (the 556-748 MHz seen in perf-20260929-153205.csv).
// prefer_power_efficiency(): APerformanceHint_setPreferPowerEfficiency (API 35), set by the frame-rate
// policy (main.cpp FrameRatePolicy) except in the highest mode.
// policy (frame_policy.cpp FrameRatePolicy) except in the highest mode.
// - set_display_refresh_rate() / max_refresh_rate(): MainActivity switches the display mode at run time
// for the frame-rate setting (60 Hz unless the setting wants more).
// - battery_power(): BatteryManager current + voltage for the perf log's power columns; the power is only