Repository navigation
Conversation
* M3: rasters reach egui without a copy on the UI thread Every page, tile and thumbnail raster was copied pixel by pixel on the UI thread (`ColorImage::from_rgba_premultiplied`), because egui's `Color32` is 4-byte aligned and a `Vec<u8>` isn't. That is 0.5 ms per 1024² tile, 5.4 ms for a 33 MB page and 36 ms for a 197 MB page, against a 16.7 ms frame. hayro, vendored patch 7: `render_size` and `render_into` render into a buffer the caller allocates. `render` is `render_into` on a new pixmap, so its output is unchanged. pdfcraft-render renders straight into `Pixels`, the same premultiplied RGBA bytes kept in one 4-byte word per pixel. `Pixels` dereferences to `[u8]`, so every reader of `RenderedPage::rgba` compiles unchanged. The canvas reinterprets the words as `Color32`s and hands them to egui as they are. Pixels are identical: all 33 renders of storytold#260's test file hash the same. The UI-thread copy is gone, and rendering a 6182×8000 page takes 67 ms instead of 71–76 ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * M3: render_into leaves a buffer of the wrong length untouched instead of reaching vello's assert * M3: regression test for render_into with a wrong-length buffer --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>
The window had no string catalog, so a system language or an explicit choice could not change what it says. Preferences now offers System, English and čeština. System follows a cs or cs-CZ locale. The ribbon tabs, File menu, title bar, status bar and Preferences use that choice. Ribbon groups and the other dialogs stay in English. Closes storytold#162 Co-authored-by: Cursor <cursoragent@cursor.com>
be27837 to
4b75fd2
Compare
FredApps
left a comment
There was a problem hiding this comment.
ReviewerA — source-read COMMENT (not an approval)
I read the head of the diff: Czech for the application shell. The lock gains sys-locale 0.3.2 (a small crate that reads the operating system's locale), which the same author's Japanese, Korean, Indonesian, Vietnamese and Simplified Chinese PRs (deckcraft#543, #548, #575, #579, #538) also add. Six PRs each add the same dependency and presumably the same language-selection code, so they cannot all be right: they should be stacked on one PR that introduces the dependency and the selection mechanism, and each language should then be its own small catalogue. The catalogue needs a native check and a statement of who translated it and whether a tool helped. sys-locale is a small crate that uses libc. I have not run it, and no exact-head CI result exists for this head. Nothing was run.
I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.
Status: waiting_author.
Summary
app.language(system,enorcs).csorcs-CZlocale. Slovak (sk) stays English. On the web build, System stays English until the user picks a language.Test plan
cs-CZresolves to čeština whileskdoes not, and an unknown saved code falls back to System.app.languagecsrenames the File tab to Soubor and Preferences to Předvolby, thatskis rejected, and thatenbrings File back.cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings, assets, layers and the wasm check pass.cargo test --workspacepasses, apart from three font tests that already fail here becausecraft-fontsis not installed:symbol_font_characters_draw_in_the_sym_font,korean_composes_in_the_notes_paneandcjk_text_in_the_interface_is_drawn_with_real_glyphs.Closes #162