Skip to content

Render 2D image edits in a reusable tiled worker - #219

Closed
JohnSt99 wants to merge 1 commit into
vycdev:developfrom
JohnSt99:codex/tiled-image-worker
Closed

JohnSt99 wants to merge 1 commit into
vycdev:developfrom
JohnSt99:codex/tiled-image-worker

Conversation

@JohnSt99

Copy link
Copy Markdown
Contributor

Closes #165.

  • Reuse one worker per image preview for adjustment rendering and full-resolution Apply. The worker accepts image snapshots and optional simultaneous RGB replacements, and drops cancelled requests.
  • Process 128 × 128 tiles with a one-pixel clarity halo. Pixel readback and reusable output and blur buffers together fit below 200 KiB per request.
  • Keep the same adjustment path on the main thread if worker canvas APIs are unavailable. A preview failure shows a retry control.

Local timing on a 3,072 × 2,048 PNG with 32 px colored squares, recorded in Chromium under WSL. After a warm-up, four alternating baseline and worker runs measured one keyboard Exposure step, committed on blur.

Median Baseline Worker
Time until the changed preview was visible 262 ms 375 ms
Longest frame gap while waiting 267 ms 33 ms

Validation: Production build and lint, a byte-for-byte full-frame comparison with transparency and clarity across tile seams, 19 image-edit guard and worker smoke tests on the final build, and 22 image import, history, and 3D regression checks during development.

@vycdev

vycdev commented Nov 30, 2026

Copy link
Copy Markdown
Owner

Thanks @JohnSt99, the tiled worker is a really nice base to build on! develop has changed a lot around CanvasPreview since this was opened, so I rebased your commit onto it, kept you as its author, and opened #261 to land it. That PR also fixes a few races found in review. I'll leave this one open for you.

@vycdev

vycdev commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Closing now that #261 is merged into develop. Thanks again!

@vycdev vycdev closed this Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants