Commit Graph
2616 Commits
Author SHA1 Message Date
3968e24cf0 Integration: the empty-layer check honours the default pixel and video (#7716)
`is_empty_pixel_layer` took any layer without stored tiles for empty, so a
layer opaque only through its default pixel (as KRA imports it,
`Surface::with_default`) or a blank video layer became the Pattern Fill
(and the Stamp Visible target) instead of getting one above. It now
needs a transparent default pixel (alpha only: a mode or profile
conversion gives an empty layer's default pixel other colour bytes) and
no video.

Co-authored-by: Hodd <32705043+hodd1444@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 16:12:49 +01:00
David Mann 0e72c418da Merge remote-tracking branch 'origin/main' into pr-7716-fixup
# Conflicts:
#	crates/engine/src/cmd/pattern_cmds.rs
#	crates/ui-egui/src/panels.rs
2026-10-29 15:45:55 +01:00
David Mann cf66eea4c9 Merge PR #8015: Added advanced selections keyboard shortcuts 2026-10-29 15:45:22 +01:00
David Mann 56d1da1943 Merge origin/main into pr-8015-fixup
Main split crates/engine/src/vector_cmds.rs into cmd/vector_cmds.rs and
cmd/vector_cmds/paths.rs, moved the shortcuts tests into
input/shortcuts/tests.rs and PhotocraftApp::run into app/commands.rs.
The PR's change is ported as it is to the new places; its text-field
test now draws the field every frame, as main's egui drops the focus of
a field that isn't drawn.
2026-10-29 15:29:05 +01:00
David MannandClaude Opus 5.5 7b72ce949e Merge origin/main into #8623's fix-up branch
Main split the files this PR changes: transform_tool.rs into tools/transform_tool/ (begin,
commit, drag_modes, draw, pointer, tests), canvas.rs into canvas/ (display, tool_input,
transform_controls, transform_controls_tests, snap_ui), and transform_cmds.rs into
cmd/transform_cmds.rs + tests.rs. The PR's changes are carried into the new modules as they
were. One adaptation: rotate_dir on main takes the live gesture (#5405), so the shared box's
gesture is passed through a new live_gesture helper instead of the PR's `rotating` bool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 14:37:31 +01:00
FredApps 53dbfe280c Integrate 16 reviewed performance and usability PRs
Includes #8472 #8488 #9461 #9793 #9809 #9813 #9814 #9822 #9826 #9847 #9850 #9852 #9921 #9924 #9961 #10080 at reviewed heads.

Preserves each PR head as a parent. Reconciles CI workflow inputs and benchmark jobs without dropping checks. Excludes #8536 #9825 #9969 #10129. Combined CI pending; no manual validation claimed.
2026-10-29 14:31:15 +01:00
FredApps e40cdadb63 Preserve opening snapshot assertions and refresh generated scorecard 2026-10-29 07:52:28 +01:00
FredApps 964a47b51c Reconcile history, gradient, type safety and UI validation behavior 2026-10-29 07:30:56 +01:00
Khawar Zamman Wani e2cd2a335a Composite smart object sources in tile-aligned blocks
Row strips of a very wide source still allocated whole 256-row tiles
across the full width for every few rows (about 293 MiB per strip of a
300000 px RGBA8 source). Blocks are now whole tiles, at most 4096 px wide
and 1 Mpx in all, and their tiles move into the result without a copy.
2026-10-29 11:48:58 +05:30
FredApps 11fdb18070 Fix integration validation regressions and enable manual full sweeps 2026-10-29 07:10:41 +01:00
FredApps 5a5e2c48dd Merge approved PhotoCraft PR #3345: Add grouped gradient presets and selectable style icons
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Port grouped gradient browsers and style previews into current modular sidebar/options controls. Keep current transactional stop preview, drag/drop ownership and sidebar activation semantics; add compact Properties preset picker without replacing stop engine. Preserve accessibility Role metadata and all approved regressions.
2026-10-29 06:37:29 +01:00
FredApps 4f23f459ba Merge approved PhotoCraft PR #3464: fix(vector): target selected saved paths and own Pen gestures
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Reconcile captured Pen and Freeform targets with current resumed-subpath, Type Path, Path Operation and draft recovery behavior. Valid source-owned tab switches commit to captured original target; invalid snapshots cancel with a diagnostic; refused commits retain draft and suppress automatic retries. Preserve current Saved(index) API and hidden-work-path protections, register all new ownership/gesture tests and add original-target tab-switch/deleted-target cases. Includes verified compile/API corrections from prior checkpoints.
2026-10-29 06:33:02 +01:00
Khawar Zamman Wani dafbff2b05 Test the web build's Memory Usage cap
The cap is now a function of the stored value and the target, so native
tests check values below, at and above it; the native-only assertions are
gated to native targets.
2026-10-29 11:02:50 +05:30
Khawar Zamman Wani 0eaf976088 Keep smart object source strips within their pixel budget
Rounding the strip height up to the compositor's 256-row tile let a very
wide source (300000 px) composite 76.8 Mpx in one strip. Strips are now as
many rows as fit in the budget, at least one; the equivalence test also
covers strips off the tile grid.
2026-10-29 11:02:50 +05:30
FredApps de48193ece Merge approved PhotoCraft PR #3519: feat(export): optionally trim transparent margins from layer files
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Port transparent-margin trim into current authorized streaming export report, retaining skipped-layer reasons and stable numbering. Measure alpha in bounded render bands, including masks/effects; keep empty-layer canvas and source document immutable. Preserve original regressions.
2026-10-29 06:15:09 +01:00
FredApps c9430c92e3 Merge approved PhotoCraft PR #3748: control: suggest near matches for unknown command ids and methods (#3674)
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Add bounded deterministic suggestions via current error/session/control modules while preserving authorization/modal checks. Register hints and all original tests; fix scrollbar choice import and updated PSD image fixture field found by 100-head check.
2026-10-29 06:14:31 +01:00
FredApps dd428d2780 Merge approved PhotoCraft PR #4035: fix(cmyk): Flatten Image and merges keep the inks of a tagged CMYK document (#3778)
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Current compositor already preserves plain CMYK inks, tagged profile separation and uncropped merge bounds. Keep stronger native CMYK/Lab paths and current merge API; apply profile context to style rasterization and retain approved tagged-CMYK regression fixtures.
2026-10-29 06:12:35 +01:00
FredApps 1daf3bc079 Merge approved PhotoCraft PR #4890: Add scrollbar visibility preferences (#3262)
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Port visibility preference, choice registration, live panel style and canvas override. Keep current animated camera and toolbar exclusions. Relocate misplaced persistence regression to prefs tests; retain current parity score counts.
2026-10-29 06:09:52 +01:00
FredApps 32f583f1d6 Merge approved PhotoCraft PR #5082: fix(mixer-brush): Alt-click samples the foreground colour like the Brush (#4873)
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Preserve current spatial Mixer Brush Alt-click sampling and live transaction architecture; add compatible point-sample command without foreground mutation. Retain sample across automatic reload until foreground changes and preserve all new regressions.
2026-10-29 06:05:02 +01:00
FredApps 1953077164 Merge approved PhotoCraft PR #5270: Layer Style: Gradient Overlay takes any number of colour stops (#5177)
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Port arbitrary-stop editor into current responsive dialog. Preserve source interpolation and exact model colors; unchanged dense imported snapshot lists roundtrip while edited lists retain 256-stop cap. Retain both validation guards and all original regression tests. Correct saved-path callers, floating-window and crop fixtures found by frozen 88-head all-target check.
2026-10-29 06:02:29 +01:00
FredApps 8323688e1f Merge approved PhotoCraft PR #5453: Shapes: independent fill and stroke paints (solid, gradient, pattern), part 1
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Integrated independent exact shape paints and atomic pattern clipboard snapshots into current modules, preserving current soft-mask coverage, shape cache keys and gradient stop caps. Shared bounded COW pattern sampling now retains minification filtering; shapes/clipboards resolve lazy catalog entries to full pixels. Preserved CPU/GPU/depth/model regression matrices; also corrected missing glow-test enum imports found by the 80-head check.
2026-10-29 05:53:29 +01:00
FredApps c81347aaa8 Merge approved PhotoCraft PR #5493: Import Photoshop custom shape sets into the Shapes panel
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Integrated bounded atomic CSH set parsing, unique shape/group naming and native Shapes panel import with inline-data authorization guards; preserved duplicate-name, inner-hole, malformed-second-record and preferences-reload regressions. Combined independent catalog additions and retained current parity metadata.
2026-10-29 05:47:45 +01:00
FredApps 9df3697de8 Merge approved PhotoCraft PR #5650: Guides: ⌥ turns a dragged guide; dropping one on either ruler deletes it (#5034)
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Added Alt guide rotation in current ruler/tool-input modules and engine Move Guide, retaining click-versus-drag selection, deletion on either ruler, colors, ruler-origin units and snapping. Selection follows the new orientation/index after a successful turn; original guide-turn/deletion regressions retained.
2026-10-29 05:46:02 +01:00
FredApps a72296ee57 Merge approved PhotoCraft PR #6139: Fix painting workflows, File Info and layer selection
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Ported Behind paint across engine/render and shared options-bar/canvas mode menus, preserving Clear and current popup ownership. Added localized responsive picker title/width and File Info multiline fields without dropping ordered fields, Browse or camera metadata; ported Pen anchor repositioning, copy cursor, grayscale-target sampling and authorized select-under-cursor dispatch into current modules with original regressions.
2026-10-29 05:39:00 +01:00
Khawar Zamman Wani a4cb9cd729 Test smart object source compositing across strip edges
The equivalence tests used a 64x48 source, a single strip, so a shadow or
mask crossing a strip boundary was never compared with the full-size path.
2026-10-29 10:08:06 +05:30
Khawar Zamman Wani 10f0648058 Cap the history budget on the web build
The default Memory Usage is 8 GiB per document, above the 4 GiB a
wasm module can address, so on the web the History budget could never
be reached and trimming never ran.

Performance::effective_memory_usage_mb caps the stored preference at
1536 MB on wasm32 and returns it unchanged elsewhere. The History
budget, the transform budget and the canvas allowance in the UI read
it. The stored preference and its default are untouched, so a saved
8192 still loads and still means 8192 on desktop.
2026-10-29 10:03:25 +05:30
Khawar Zamman Wani b779bd8f02 Count embedded smart object contents toward the history budget
History counted a document's pixel tiles but not the file bytes a
smart object embeds (SmartSource::Embedded). A document of large
embedded sources was far over its memory budget without trimming
ever noticing, and every Replace Contents kept the old bytes alive in
the undo states unaccounted.

The four counters (add, remove, bytes_with and the uncounted walk)
now visit one shared list of blocks: the tiles as before plus each
embedded source's Arc, keyed by address. States, snapshots and
duplicated layers that share an Arc count it once, and trimming the
last state that holds an old source releases it.
2026-10-29 10:03:25 +05:30
Khawar Zamman Wani e96386fe47 Bound and purge the decoded smart object source cache
The cache estimated an entry at channels * 4 bytes a pixel, four times
too much for 8-bit, always kept a single oversize entry, recovered a
poisoned lock by disabling itself, and nothing ever cleared it.

Count each entry's real tile bytes once when it is cached, and do not
cache a source larger than the whole budget (as the stage cache does).
Web builds keep 4 entries and 384 MiB instead of 32 and 1 GiB, and the
smart filter stage cache 256 MiB instead of 768 MiB. A poisoned lock
is recovered rather than ignored.

Edit > Purge > All now clears the cache and reports it, and enables on
it alone. Closing a document that has smart objects clears it too:
entries are shared by content hash, so other documents just decode
again on their next re-render.
2026-10-29 10:03:25 +05:30
Khawar Zamman Wani ee57fdb90e Smart object sources decode through the strip compositor
The first re-render of a smart object (Free Transform commit, Image
Size, a filter edit) flattened its source into one full-size RGBA
float buffer (16 bytes a pixel) and then converted it into a second
f32 vector before the surface was built, about 32 bytes a pixel on top
of the decoded document.

Composite the source in strips of about a megapixel straight into the
target pixel format instead. RGB, Grayscale and the depth conversions
give the same pixels as before (checked bit for bit, including masks,
blend modes and layer effects). CMYK and Lab composite natively in the
banded compositor and land up to 16 and 1 steps (8-bit) off the buffer
path, so sources in those modes keep the buffer path.

A 4096x4096 RGBA8 source now peaks +191 MiB (12.0 B/px) instead of
+655 MiB (41.0 B/px); tests/smart_source_peak.rs holds it under 16 B/px.
2026-10-29 10:03:25 +05:30
FredApps a62b9ee217 Merge approved PhotoCraft PR #8347: Type: Roman Hanging Punctuation (trailing marks hang, don't steer the alignment)
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Ported hanging punctuation into current line placement and kerning modules, preserving forced breaks, bounded edge-tip row merging, justified-last-line behavior, area exclusions and independent Roman orientation shaping; kept PSD/engine/UI regression coverage.
2026-10-29 05:22:57 +01:00
FredApps 2e2eec3a43 Merge approved PhotoCraft PR #9478: fix(text): vertical type sets roman letters upright, one per em, as Photoshop does (#9470)
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Ported upright Roman classification, independent unkerned/unligated em advances and tab reflow into current Para/VerticalPiece shaping modules; preserved area and paragraph flow; retained vertical geometry and PSD BaselineDirection regressions.
2026-10-29 05:18:29 +01:00
FredApps d98e419542 Merge approved PhotoCraft PR #5176: Play CopyCat, AJ and Line and Color action sets; keep patterns across restarts; Shift Edge scale
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Ported mappings and smart Save into current modules, preserving bounded authorized playback; migrated legacy PAT by committing validated per-pattern assets before atomic authoritative index; preserved same-ID replacements and builtin edits; added temporary-store interruption, corruption, duplicate ID/name and restart regression coverage. Current all-target compilation passed before final ownership guard refinement; focused tests pending.
2026-10-29 05:15:28 +01:00
FredApps 889018cabb Preserve action definition history regression with extended action metadata 2026-10-29 05:05:06 +01:00
FredApps e0bca6baf6 Use explicit float mask format in combined Fill parity regression 2026-10-29 05:02:27 +01:00
FredApps 7da5d15a34 Merge approved PhotoCraft PR #7255: fix(engine): guard trim and duplicate merged against documents exceeding render limits (#7223)
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Preflight existing render-cap helper before allocation, retain post-render completeness checks, and preserve the oversized Trim/Duplicate atomic-refusal regression.
2026-10-29 04:53:33 +01:00
FredApps 99cf87f5ec Merge approved PhotoCraft PR #7742: Actions: a fractional setting an integer field cannot hold is refused, not rounded
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Reuse current ExactLong refusal for Ripple/Crystallize, preserve command-specific rounding rules, improve the diagnostic and retain all fractional/whole-value regression cases.
2026-10-29 04:49:39 +01:00
FredApps 959b41dca4 Merge approved PhotoCraft PR #9606: fix(ui): the Color panel remembers its options across restarts
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Persist and restore Color panel options through the current dock/startup modules and regenerate the scorecard from current source.
2026-10-29 04:46:40 +01:00
FredApps a4862c8fee Merge approved PhotoCraft PR #5515: Selecting subject now automatically applies to selected layer, and us…
Preserve both independent additions and moved regression modules without changing production merge semantics.
2026-10-29 04:40:56 +01:00
FredApps 4546543013 Refresh 61-head progress and adapt filter-result error propagation 2026-10-29 04:37:44 +01:00
FredApps 6c225b13c3 Merge approved PhotoCraft PR #5010: Layer Style: Photoshop's layout (three columns, OK/Cancel/New Style/Preview on the right, one-line rows) [depends on #4938]
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Port responsive three-column Layer Style with owned right-side actions, preserve saved defaults/Blend If and current Curves/modal routing, and keep all original layout/Cancel tests registered.
2026-10-29 04:36:06 +01:00
FredApps 93f11e42aa Adapt Frequency Separation module registration and finish icon attribution reconciliation 2026-10-29 04:22:09 +01:00
FredApps 2f6156bebe Merge approved PhotoCraft PR #5090: Actions: add editable PhotoCraft Essentials starter presets
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Register starter actions and bounded background-blur command in current modules; preserve persistent migration marker and portable JSON defaults compatibility.
2026-10-29 04:18:29 +01:00
FredApps ab9c044fba Merge approved PhotoCraft PR #3461: Replay recorded layer visibility on the intended named layer
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Resolve recorded visibility targets before both engine and shell authorization, preserving bounded playback, paused dialogs and existing journal coalescing; retain ActionState take generation.
2026-10-29 04:16:32 +01:00
FredApps 6e13443ca6 Merge approved PhotoCraft PR #3455: Undo and redo action definition edits from the Actions panel
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Keep action-definition undo separate from document history and preserve upstream panel routing and layout.
2026-10-29 04:12:47 +01:00
jonathanwxh-cell 37e511d5c1 Import engine result types after document session module split 2026-10-29 11:12:39 +08:00
FredApps 45e790c216 Merge approved PhotoCraft PR #1991: feat(actions): import and export reusable Actions JSON files
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Register bounded Actions JSON module in current command tree; preserve all ambient path restrictions and inline-data allowances with regressions.
2026-10-29 04:11:37 +01:00
jonathanwxh-cell df290aca5c Merge upstream main into PR #7621, preserving feature and current progress documentation 2026-10-29 11:05:44 +08:00
FredApps 17c4dabf90 Merge approved PhotoCraft PR #4305: Filter > Other > Frequency Separation (#1714)
Preserve current module structure and port the approved source/test changes to unique current locations.
2026-10-29 03:56:41 +01:00
FredApps bf33e45694 Merge approved PhotoCraft PR #9342: fix(io, engine): Embed Color Profile writes sRGB for an untagged document (#9325)
Preserve current module structure and port the approved source/test changes to unique current locations.
2026-10-29 03:51:21 +01:00
FredApps 537f206dc3 Merge approved PhotoCraft PR #9509: fix: an edit at full coverage keeps its result over huge 32-bit values
Port unchanged PR hunks to their unique current module locations after upstream file splits.
2026-10-29 03:36:56 +01:00