Record TD-1 as paid off, checked by eye on the tablet

The pre-rotation patches landed in the previous four commits. This
records how the debt was paid, by a fourth route its own list missed:
patching wgpu-hal and Slint's Skia surface locally rather than waiting
for either upstream. It also updates architecture.md §1 and §6.1, which
still said Android draws with OpenGL behind a readback.

The verification is stated as what it was: the user found the
release-signed build clean on the tablet in portrait. No dumpsys
composition or bufferTransform readings were taken, because adb would
not hold the device that morning, and no frame times were measured.
This commit is contained in:
2026-09-25 07:26:00 -04:00
parent a8043e6827
commit b480de5bff
2 changed files with 45 additions and 10 deletions
+9 -9
View File
@@ -11,9 +11,10 @@ and records the decisions and constraints behind the design.
## 1. Overview
DarkRoom is a Rust application with a Slint interface. On Linux it renders through wgpu to Vulkan.
On Android it renders through Skia to OpenGL — not by preference but because wgpu's Vulkan
swapchain cannot pre-rotate, which tears a portrait window on a landscape-mounted panel
([technical-debt.md TD-1](technical-debt.md)). The compute passes are wgpu on both. The design is organised around four ideas, each of which the rest of this
On Android it renders through Skia, also on wgpu's Vulkan swapchain, which a patched wgpu-hal and
Skia renderer pre-rotate for a landscape-mounted panel ([technical-debt.md TD-1](technical-debt.md),
[third_party/](../../third_party/README.md)). The compute passes are wgpu on both, on the same
device the compositor draws with. The design is organised around four ideas, each of which the rest of this
document elaborates:
1. **Pixels stay on the GPU.** From decode to display, image data never round-trips through the
@@ -1125,12 +1126,11 @@ At 4K the shader finishes in 0.28 ms and then 7.15 ms is spent moving pixels thr
26× overhead that scales with area, which is why an uncapped window resize falls off a cliff. The
constraint is not a stylistic preference; it is the dominant cost in the frame.
**One exception, on Android only, and it is debt rather than a revision.** The develop view there
reads the frame back rather than handing over a texture, because zero-copy requires Slint to draw
with wgpu and wgpu's Android swapchain tears a portrait window. The reasoning, the measurements
that forced it and what would remove it are in [technical-debt.md TD-1](technical-debt.md). The
constraint above still governs every other path, including the desktop develop view and the export
pipeline, and the Android exception is expected to be temporary.
**No exceptions since 0.15.0.** Android read the develop frame back until then, because wgpu's
Vulkan swapchain could not pre-rotate and a portrait window tore on the tablet. Two local patches
removed the need ([technical-debt.md TD-1](technical-debt.md)), so the frame reaches the compositor
as a texture on both platforms. The constraint governs every display path. The export pipeline
reads pixels back by design, because a file is its output.
### 6.2 Tiling from day one