m7c: brand splash instead of the white startup screen
- LaunchTheme/NormalTheme on #05070A (was the stock light theme + white windowBackground) and the Android 12 splash API in values-v31 - splash icon is a padded 512x512 canvas: Android masks everything outside the inner 192dp of the 288dp icon area, which clipped the wordmark at the top; the icon plate is set to the icon navy - Flutter splash (lib/src/ui/splash_screen.dart): logo pulses (scale 0.96-1.04, opacity 0.72-1.0, 1100 ms) plus a thin progress line, min 700 ms measured from the first Flutter frame - boot work (session, FFI library, ad SDK) now runs after the first frame and the game fades in over the splash: no blocking work before the first frame - numbers (Redmi Note 10, API 31): debug 3053 ms, profile/AOT 2040 ms on the first start, 850-960 ms on later cold starts, ready log ~1030 ms - fixed: top-level Stopwatch only started on first access (Dart lazily initialises top-level finals), so the boot log always showed 0 ms - tools/device/startup.sh measures cold start + boot log; testing.md documents the splash chain and the MIUI release-install trap
This commit is contained in:
@@ -73,11 +73,47 @@ flutter test --update-goldens # nur nach bewusster UI-Änderung, im PR begr
|
||||
| `install.sh` | Deinstallieren, installieren, starten, PID prüfen |
|
||||
| `smoke.sh` | Start → Menü → Match → 3 Schüsse → Ergebnis; 20 Screenshots nach `/tmp/shots` |
|
||||
| `perf.sh` | **SurfaceFlinger-Frame-Timestamps** (Flutter rendert nicht über HWUI, `gfxinfo` liefert 0 Frames): p50/p90/p99 + Jank gegen 1,2 × Vsync |
|
||||
| `startup.sh` | Kaltstart: `am start -W` (`TotalTime`) plus `iron_arc: ready after N ms` aus dem Log – läuft nur sinnvoll, **nachdem** der Consent einmal erteilt wurde (sonst zählt der UMP-Dialog mit) |
|
||||
| `logs.sh` | Filter: Rust-Panic, `wgpu`/`Vulkan`, JNI, Billing, Consent |
|
||||
|
||||
**Wichtig:** Screenshots werden als PNG abgelegt und im Review **angesehen**; `perf.sh`-Report
|
||||
landet in `docs/perf/<datum>-<gerät>.md` und ist Release-Voraussetzung.
|
||||
|
||||
### Startzeit & Splash-Kette
|
||||
|
||||
Gemessen auf dem Redmi Note 10 (Android 12, API 31), Consent bereits erteilt:
|
||||
|
||||
| Build | `TotalTime` (erster Frame) | `iron_arc: ready after` |
|
||||
|---|---|---|
|
||||
| Debug (JIT) | 3053 ms | ~1740 ms |
|
||||
| Profile/AOT, erster Start nach Installation | 2040 ms | ~1040 ms |
|
||||
| Profile/AOT, weitere Kaltstarts (Caches warm) | **850–960 ms** | ~1030 ms |
|
||||
|
||||
`TotalTime` ist der Zeitpunkt, ab dem der Splash steht – die Partie erscheint gut 1 s später
|
||||
(700 ms Mindeststandzeit + 280 ms Fade).
|
||||
|
||||
Die Startstrecke ist bewusst dreiteilig, damit zu keinem Zeitpunkt ein weißer Screen zu sehen ist:
|
||||
|
||||
1. **Nativer Splash** (ab Prozessstart): `LaunchTheme` mit `windowBackground` = `@color/launch_bg`
|
||||
(`#05070A`), darunter zentriert das Logo. Ab API 31 übernimmt die System-Splash-API
|
||||
(`values-v31`): Markenfarbe + `launch_logo_splash` auf einer Icon-Platte in Icon-Navy.
|
||||
Die 512×512-Vorlage hat das Motiv nur auf 59 % Breite, weil Android alles außerhalb der
|
||||
inneren 192 dp des 288-dp-Icon-Bereichs **wegmaskiert** (sonst wird „IRON“ abgeschnitten).
|
||||
2. **Flutter-Splash** (`lib/src/ui/splash_screen.dart`): pulsierendes Logo (Scale 0,96→1,04,
|
||||
Deckkraft 0,72→1,0, 1100 ms) plus dünne Fortschrittslinie. Mindeststandzeit 700 ms,
|
||||
gemessen ab dem ersten Flutter-Frame – nicht ab Prozessstart, sonst überspringt ein langsamer
|
||||
Enginestart die Animation komplett.
|
||||
3. **Fade** (280 ms) über die bereits gebaute Partie, danach wird der Splash aus dem Baum entfernt.
|
||||
|
||||
Erst danach startet das Ad-SDK (`_ads.initialize()`), damit UMP-Dialog und SDK-Init niemals
|
||||
vor dem ersten Frame liegen. Video-Nachweis: 6-fps-Aufnahme des Kaltstarts, Frames bei
|
||||
0,4 s (nativer Splash), 1,5–1,8 s (pulsierendes Logo), ab 2,1 s Partie.
|
||||
|
||||
**MIUI-Falle:** `adb install` eines **release**-signierten APKs scheitert mit
|
||||
`INSTALL_FAILED_USER_RESTRICTED`. Für Messungen auf dem Gerät daher `flutter build apk --profile`
|
||||
(AOT wie Release, aber debug-signiert); die echte Release-Prüfung läuft über die Split-APKs aus
|
||||
dem AAB.
|
||||
|
||||
## 6. CI-Gates (Definition of Done für jeden PR)
|
||||
|
||||
1. `cargo fmt --check`
|
||||
|
||||
Reference in New Issue
Block a user