App 2.40.2: the Grid map moves on the GPU
The map was hardware-rendered, but every frame recomputed every road point, rebuilt every path and drew the big roads three times, at 20 frames a second, and the car jumped with each GPS fix. Now it is its own view under the Grid (MapLayerView, a hardware layer): drawn once into a GPU texture and only redrawn when tiles change or after about 230 m; each display frame only sets its translation and rotation. The car glides between fixes, and the Grid over the map redraws only with the readings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
@@ -138,6 +138,21 @@ tyre pressures, GPS (lat, lon, elevation, heading) and the is_* flags. It does *
|
||||
confirmed car facts, app structure, UI conventions, build/test/ship, documents. It replaces
|
||||
upstream's EVABRPUploader text. The test emulator is now in the flake: `nix run .#car-emulator`
|
||||
(Android 9 AOSP at 1920×720, 160 dpi; the car build installs as the system user — checked).
|
||||
- 2026-10-27 — App 2.40.2: **the map moves on the GPU** (owner: "is the map screen gpu
|
||||
accelerated? it looks a bit slow on update"). It was hardware-rendered, but every frame (20 a
|
||||
second) recomputed every road point on the main thread, rebuilt all paths, and drew the big
|
||||
roads three times for the glow; and the car jumped with each GPS fix (1 Hz). Now the map is
|
||||
its own view under the Grid (`MapLayerView`, `LAYER_TYPE_HARDWARE`): drawn once into a GPU
|
||||
texture round an anchor and only redrawn when tiles come or go or the car is ~280 layout units
|
||||
(≈230 m) from the anchor; each display frame (`postOnAnimation`, only while that style is on
|
||||
screen and the map shows) sets its translation, pivot and rotation, which the GPU composites.
|
||||
The car glides towards each fix (eased, snaps beyond 200 m), the heading eases; GridView over
|
||||
the map no longer animates itself (only the readings redraw it), the "far roads fainter" sort
|
||||
is a fixed dark gradient towards the top. Layer size on the car about 2500 px square (~25 MB).
|
||||
Measured on the emulator: with SwiftShader (software GPU) old and new both ~57 ms a frame, and
|
||||
with the host's Intel GPU (`-gpu host`) both run at the display rate (~18 ms) — the emulator
|
||||
is too fast to show the car's slowness, so the gain on the head unit is reasoned, not
|
||||
measured. Not tried on the car.
|
||||
- 2026-10-27 — App 2.40.1: **an update that downloaded but never reached the installer** (owner:
|
||||
"sometimes … downloads the update but then doesn't start the installer"). The car refuses the
|
||||
installer session ("Not allowed to install non-system apps on internal storage"); only a
|
||||
|
||||
Reference in New Issue
Block a user