mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-13 14:59:06 +00:00
The blur itself was already parallel (9-15 ms on 24 MP); most of the command was serial glue around it. Modify copied the mask into a padded buffer and back out sample by sample even with no padding, and combine built a full-canvas byte buffer, scanned it, then copied it into tiles on one thread. - modify: use the mask as is when the selection is clear of the canvas edge (pad 0); pad and crop row by row otherwise. - combine / mask_to_surface: fill selection tiles in parallel straight from the mask, a row at a time; fully selected tiles share one copy-on-write tile. Bit-identical: the per-sample oracles (combine, now with whole tiles, and the old pad/crop) are compared in tests. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>