Commit Graph
5 Commits
Author SHA1 Message Date
jayzed80andClaude Sonnet 5.5 4777b390c9 fix(algo): Filter Gallery draws pixels from the same clamped values as its reach
The tile halo was sized from the clamped effect values, but the pixel code still read the raw
stored ones, so a stored value past its range could have a kernel larger than its halo and show
seams where tiles meet. `run` and `Prepared::new` now clamp the stack once at the entry, so the
reach and the pixels use the same values. The new test renders every gallery filter with its
range values at three times the maximum and requires the same pixels as at the maximum; it fails
without the change (ColoredPencil first).

Addresses the CodeRabbit review on this PR.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 09:16:51 +00:00
jayzed80 7f5e103ff1 fix(algo): Filter Gallery reach no longer overflows on out-of-range stored effect values 2026-11-02 12:49:55 +00:00
Khawar Zamman Wani 539f5bd58f perf(algo): row-parallel local_sharpen with fast-path protect_detail (#5426) (#9651)
* perf(algo): row-parallel local_sharpen with fast-path protect_detail (#5426)

Refs #5426. Follow-up to #5499.

Cause:
While #5499 parallelized local_blur and the per-dab mix in DabTool::Focus,
local_sharpen in crates/algo/src/retouch.rs remained single-threaded.
In addition, protect_detail redundantly evaluated coordinate clamping
and strided memory lookups across 8 neighbors inside the per-channel
inner loop for every pixel in the dab. On large brush sizes (e.g. 1000–2500 px),
strokes took seconds and stalled the application.

Change:
- Process local_sharpen window rows in parallel with Rayon across threads,
  with wasm32 serial fallback matching local_blur.
- Hoist protect_detail 3x3 neighborhood offset calculations outside the
  channel loop.
- Fast-path interior pixels (x > 0 && x + 1 < w && y > 0 && y + 1 < h)
  with direct stride offsets, skipping boundary clamping entirely for >99.9%
  of pixels in large brush dabs.
- Add retouch_sharpen_exact integration test verifying bit-for-bit parity
  against the frozen scalar implementation across layouts, edges, and channels.

* bench(engine): add bench_sharpen_tool example
2026-10-29 12:11:22 -04:00
Yongjip Kim cd2b4aca0c test(liquify): expand freeze-boundary regression coverage (#8082) 2026-10-23 17:40:45 -04:00
aiongg a6428d3dfb Build each crate's integration tests as one binary
Every tests/*.rs file is its own executable that links the whole crate
graph. Move each crate's test files into tests/it/ as modules of one
tests/it/main.rs; helper modules under tests/common move with them.

These keep their own binary (own process):
- engine panic_hunt: a process-wide panic hook counts every panic.
- engine text_gamma: changes the process-wide text gamma.
- engine smart_filter_stages, mask_cache_purge: assert on global caches.
- codecs pnm_peak_memory: reads the process's peak RSS.
- photocraft mac_menu_appkit: harness = false.
2026-10-22 16:55:34 +00:00