Reader renders correctly in WASM: grayscale persistence model
Bumps third_party/qemu to the X3 grayscale persistence render. The in-browser reader now shows crisp black text on white (no inversion, no muddle). Marks the grayscale defect resolved in ISSUES.
This commit is contained in:
@@ -14,11 +14,11 @@ Opening a book panicked **only in WASM** (`Invalid read ... reason: rejected`
|
||||
|
||||
Worked around by forcing store-containing TBs to TCI (`wasm_tci_only_tb = true` in `tcg_out_qemu_st`). Reader now opens and paints in the browser. This is a workaround with a perf ceiling (store-containing TBs run interpreted); the precise miscompiled op is not yet localized. Full investigation and next steps: `docs/wasm-inflate-panic.md`.
|
||||
|
||||
## Reader inverts to muddled grayscale after the initial page
|
||||
## Resolved: reader grayscale rendered inverted and muddled
|
||||
|
||||
With the panic worked around, the reader first paints a correct BW page (black text on white), then a follow-up refresh inverts it into muddled white-on-black text. This reproduces in the browser and is the current top reader defect.
|
||||
The reader drew a crisp BW page, then a 4-level grayscale antialiasing pass (inverted plane polarity, near-empty planes) that the old model rendered as a full frame, wiping the page to an inverted muddle. The `xteink_x3_eink` model now keeps a persistent surface, detects grayscale vs BW by DTM2's set-fraction, and treats grayscale level 0 as no-drive (keep pixel) so only antialiased edges repaint over the retained BW page. Reader text renders sharp on native and wasm.
|
||||
|
||||
The reader uses the X3 community **4-level grayscale** path (DTM1=LSB, DTM2=MSB, grayscale LUT), whose plane polarity differs from the BW menu mode. The `xteink_x3_eink` model ignores LUT/grayscale commands and renders only DTM2 as `bit=white`, so the grayscale pass comes out inverted/garbled. Fixing this means tracking grayscale mode and rendering DTM1+DTM2 as 2-bit levels. Iterable on native (fast, no wasm rebuild).
|
||||
Ceiling: the BW-vs-grayscale detector assumes the background is the white pixel majority, so a genuinely mostly-black BW frame would flip. Upgrade path: decode the loaded LUT directly.
|
||||
|
||||
## Cold boot requires a manual power-button hold
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule third_party/qemu updated: 1f76f73fee...ede6e5b9f3
Reference in New Issue
Block a user