Commit Graph
561 Commits
Author SHA1 Message Date
David Mann 55372923bd Merge #15764 into the merge queue batch
fix(actions): Load Actions waits for a running recording
2026-11-20 14:16:39 +01:00
FredAppsandFredApps abad0deaea Hold the normalized layer selection across engine reads (#15907)
* Hold ordered layer selection across reads

* Migrate UI and automation to the borrowed document selection

* Fix held selection migration diagnostics

* Preserve held selection for unchanged active layer

* Keep owned selection snapshots in engine tests

* Allow consuming a document state without cloning

* Preserve document ownership on close and capture export selection

* Migrate engine integration tests to held selection

* Keep isolate-layer test selection snapshot

* Read the active layer before editing the gradient test document

* Remove redundant selection slice borrows

---------

Co-authored-by: FredApps <[email protected]>
2026-11-20 18:11:54 +07:00
aiongg 6cef4c278a Merge pull request #15813 from aiongg/perf-15709b
Key document queries on revisions instead of per-frame walks (#15709)
2026-11-19 18:16:39 -05:00
aiongg abedab1e4d Cache History rows, artboard pages and the snap moving set on revisions
History gets a generation that every change takes a fresh number from, and
the snapshot list one through DocState::snapshots_mut, so the History rows
rebuild only when either moves. Artboard pages and the layers a Move drag
takes along are computed once per document revision; set_active_layer moves
the revision like the other layer selection changes, through one
bump_selection_revision. The view-only revision steps of history options,
the channel eyes and Isolate Layers go through bump_view_revision; Isolate
Layers still marks the document modified.

DocQueries drops every entry when the open document set changes, and counts
what it computes, which the idle trial asserts stays unchanged. Fill layers'
thumbnails key on impl Hash for Fill. A new trial checks the Layers rows'
revision follows a rename and both disclosure toggles.
2026-11-19 20:51:32 +00:00
hnoerenberg 4ff984e166 Merge upstream/main into fix/atn-panel-menu-10706 2026-11-19 19:36:51 +01:00
David MannandClaude Opus 5.5 8edff6734a Tests: follow the newer framework pin
The shared live client now reads integrations.whenAppClosed inside the
framework, so the preference audit lists it as read there. The pin also
brings #12709's Add Anchor Point change (Alt on an anchor no longer
deletes it), so the anchor test expects that, as #13977 does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-19 17:55:36 +01:00
aiongg c3e218738f Merge pull request #15716 from FredApps/speed-engine-fixtures-15707
Reduce slow engine test fixtures
2026-11-19 09:59:50 -05:00
aiongg 5e6d342b36 Merge pull request #15718 from FredApps/fix/15708-deterministic-spill
Give scratch tests a deterministic volume capacity
2026-11-19 09:58:09 -05:00
hnoerenberg 76d7d2952f fix(actions): Load Actions waits for a running recording
The Actions panel menu kept offering Load Actions… while an action was
recording or a paced playback was waiting, although `actions.load` refuses
both: the person chose a file first and only then got the error, and a load
during a recording replaces the set the recording writes into. Measured on
#10706, the reference application greys that row beside Clear All, Reset and
Replace while recording.

`panels/actions/menu.rs::states` now greys the row with the rule the command
itself checks (the framework leaves `Load` always on), and
`files::load_dialog` reports the reason before the picker opens, so a
keyboard, shortcut or control-channel route never asks for a file the
command would refuse. Two panel-menu tests are red without this change; the
new engine test pins the command's own rule, which already held.
2026-11-19 14:56:34 +01:00
aiongg a8f95bd16d Document layer index and index-ordered selection (#15704)
Document.layers is a LayerTree that builds an id index on first lookup and drops it on any mutable access. Layer lookups and selected_layers use the index instead of walking the document.
2026-11-19 10:07:19 +00:00
FredApps 52a5293663 Reuse content-aware crop scenes 2026-11-19 10:08:25 +01:00
FredApps 567b88610a Pair tone target test flags 2026-11-19 08:36:47 +01:00
FredApps 236bc84a5e Give scratch tests a deterministic volume capacity 2026-11-19 08:01:25 +01:00
David Mann 5e172cbce1 Merge pull request #15649 from davidmann4/test-speed/tone-targets-glue-only
Tests: tone_targets builds the whole app only for the UI glue (#15648)
2026-11-19 00:30:02 +01:00
aiongg 7c34b16a95 Content-aware crop layer tests: run the straight scene at the turned scene's half size 2026-11-18 22:05:05 +00:00
David Mann bff6fb386f Merge remote-tracking branch 'origin/main' into test-speed/tone-targets-glue-only
# Conflicts:
#	crates/ui-egui/tests/it/tone_targets.rs
2026-11-18 22:41:54 +01:00
aiongg bd3712d114 Lint: each shared test fixture loads once per test binary, and xtask names its step list type 2026-11-18 21:20:35 +00:00
aiongg 626de094e9 Merge pull request #15641 from davidmann4/test-speed/15367-engine-gpu
Tests: trim repeated solves and loops in engine and GPU tests (#15367)
2026-11-18 15:33:05 -05:00
David MannandClaude Opus 5.5 6ec2b76b78 Tests: tone_targets builds the whole app only for the UI glue (#15648)
The three whole-app Levels/Curves tests ran the colour mode x bit depth
matrix that the engine's tone_target_picker tests already cover without
the app. They now run every dialog and target on an RGB document and the
grayscale, CMYK and Lab documents once each, where adjust_dialog::pick
branches; every selector form still runs for a layer mask and a filter
mask. A new engine test covers the Smart Filter mask picker in every mode,
depth and mask state, the one gray target the engine did not test yet.

Whole-app runs: 60 -> 25 (228 on main before #15637).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 21:12:45 +01:00
David MannandClaude Opus 5.5 d4797333de Tests: trim repeated solves and loops in engine and GPU tests (#15367)
- parity.rs: the two paging tests use a 660x580 document (3x3 pages, one interior cell)
  instead of 1100x900, and eviction runs 2 rounds; the residency tests that share the large
  document keep it. 16-bit runs only where the GPU reads the 16-bit upload (one effect stack,
  Dissolve and pattern cases). The disjoint-damage test paints 2 distinct series of 8 strokes
  and isolates its layers so strokes capture checkpoints, which makes its bytes assert able to
  fail. many_layers_submit_inside_one_chunk_paged is removed: its stats equal the whole test's.
- Coarse preview: drop an unchecked full-resolution solve; colour tests reuse solves and use
  Extend where Move only adds an unread fill.
- Crop fill eligibility is a unit test on additional_target; the integration test keeps 3 cases.
- PSD write oracle: one run with a passing and a failing case instead of two runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 20:47:59 +01:00
aiongg a015ef2934 Tests: engine tests on process-wide state get their own binary
The modules that assert on the scratch pool, spill configuration, simulated memory, global caches or compositor settings move to tests/global_state, where one lock makes them take turns. test-binaries lists it with the reason.
2026-11-18 19:26:28 +00:00
aiongg 877e23f543 Tests: one shared lock per process-wide global in each merged test binary
The scratch pool and spill configuration, simulated free memory and the global caches are locked from tests/it/main.rs instead of a mutex per file.
2026-11-18 19:19:35 +00:00
aiongg 0081fd10e1 Tests: merge single-file integration test binaries into one binary per crate
Each crate's top-level tests/*.rs files become modules of tests/it/main.rs, and a new xtask check (test-binaries) refuses a new single-file test binary.
2026-11-18 19:11:27 +00:00
aiongg bfaf39780b test(engine): a background job applies to the layer and channels it started on (#7366)
Replaces the ui-egui window test, whose order depended on wall time, with an engine test:
the job's result is applied only by poll_jobs/wait_job on the session's thread, so a
select_layer after start always comes first.
2026-11-18 15:12:05 +00:00
David Mann 01a5b5a389 Merge pull request #15381 from davidmann4/perf/test-speed-quick-wins
Test speed: no font scan in test processes, CMYK profile once, raw-develop at one depth (#15377)
2026-11-17 16:49:07 +01:00
aiongg ed14e1c413 PhotoCraft on the craft UI framework (#15449)
PhotoCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (next branch): shell, dock and panels, hosted dialogs, keyboard, focus, IME and pointer routing, the canvas's view commands, themes and tokens. The engine, document model, file formats, commands and automation stay. PhotoCraft pins storytold/craft-libs next.
2026-11-17 10:41:35 -05:00
David MannandClaude Opus 5.5 484483b691 test: build the CMYK test profile once, run large raw-develop sizes at one depth
- cmyk_flatten_profile: synthesise the test profile once per process and
  share one Arc, so CmykSpace's per-allocation cache builds the transforms
  once; exact() reads both rows from one run (4 documents, not 8).
- camera_raw GPU tests: the 858x572 and 1600x900 comparisons run at one
  depth each. The depth only changes the input quantization (8 and 16 bits
  both develop with float = false) and every depth runs at 171x113 above.
- cols_timing is a benchmark without assertions: ignore it like its
  siblings.
- compose: delete clipped_dissolve_is_binary_and_preserves_the_base_shape,
  a byte-identical copy of clipped_dissolve_opacity_fill_is_binary_and_
  preserves_base_shape (whose doc comment names both issues).

Part of #15376.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 02:03:03 +01:00
hnoerenberg d98386f43b test(engine): import craft_psd in the gaussian edge profile test
The shared PSD crate is craft_psd now. The test still imported photocraft_psd, so the engine test target did not compile on a merge with current main.
2026-11-16 08:25:49 +01:00
hnoerenberg 29d0068c08 Merge upstream/main into fix/gaussian-blur-edge-parity-11528 2026-11-16 01:31:39 +01:00
hnoerenberg 0b6c9d6700 Merge upstream/main into fix/gaussian-blur-edge-parity-11528 2026-11-15 16:27:43 +01:00
RickiNano 86d27993ee Assign Profile: greyed for Lab, Bitmap and Multichannel documents (#14238)
edit.assignProfile now has its own enabled check: disabled with no
document and for Lab, Bitmap and Multichannel documents, so the menu item
is greyed and a scripted run fails with "not available in <mode> mode".
RGB, CMYK, Grayscale, Indexed and Duotone (not measured) keep today's
behaviour, and Convert to Profile keeps has_doc, so it stays enabled for Lab.

The convert_profile_options helper no longer assigns lab-d50 to its Lab
document, which is now refused.

Fixes #14238
2026-11-15 14:39:15 +01:00
Dylan M. Taylor 13fe2864af Fix CI formatting, clippy, scorecard, and format routing regressions 2026-11-14 04:52:59 +00:00
Dylan M. Taylor 8c7544ed2a Use craft-affinity from craft-libs; remove crates/affinity 2026-11-14 00:16:50 +00:00
Dylan M. Taylor 040962a5b4 Merge photo-cms-port: use craft-cms and remove crates/cms (#13393) 2026-11-14 00:02:22 +00:00
MarekSpodBiedryandskylar 8631a92178 Rasterize: undo the layers already converted when a later step fails (#4974) (#5073)
* Rasterize: undo the layers already converted when a later step fails (#4974)

* Rasterize: roll back through the shared compound helper when a later layer fails (#4974)

* Test that a failed Rasterize keeps a clean document clean (#4974)

* Rasterize: undo the layers already converted when a later step fails, and refuse before a step starts when there is nothing to do (#4974)

* Format the rasterize rollback tests

* Rasterize: cover the All Layers and Layer Style refusals through the real commands

* Rasterize: name the history step after the variant, and test the rollback through the real commands (#4974)

---------

Co-authored-by: skylar <[email protected]>
2026-11-13 01:16:51 +01:00
Dylan M. Taylor 74330157cb Use craft-psd for PSD/PSB format code (#13414)
* Use craft-psd from craft-libs; remove crates/psd

* Regenerate the scorecard (28 crate roots)

* Take craft-psd at craft-libs 55d120f2

* Regenerate lockfile for current shared format crates

* Pin shared format crates to current craft-libs main

* Match brush import cap to shared decoder budget

* xtask: update layer fixtures after PSD extraction
2026-11-12 02:53:54 -05:00
Dylan M. Taylor fd943c466b Merge main into photo-cms-port; pin craft-cms to the head of storytold/craft-libs#858
main's one change to crates/cms since (#11055, the per-profile CLUT budget) is
already in craft-cms (storytold/craft-libs#815).
2026-11-11 23:18:18 +00:00
Dylan M. Taylor abeb16c96b paint: refuse a sequential-dab stroke whose working copy is too large (#11070)
* paint: refuse a sequential-dab stroke whose working copy is too large

apply_dab_stroke read the whole rectangle enclosing a stroke's dabs into
two dense f32 copies (and a third for the mix), sized by the area
between the dabs rather than what they paint. Two distant points asked
for gigabytes on a sparse document.

Check the three planes against a 4 GiB budget (1 GiB on 32-bit) before
reading, and paint nothing past it.

* address review: apply_dab_stroke returns Result so over-budget dab strokes fail with 'stroke too large'

* fix tests: apply_dab_stroke returns a Result

* fix tests: handle the Result of the dab-stroke functions
2026-11-11 16:31:47 -05:00
Dylan M. Taylor 2b75a0092d Use craft-cms from craft-libs; remove crates/cms
craft-cms was extracted from crates/cms (storytold/craft-libs#779), and both
copies changed afterwards. storytold/craft-libs#PRNUM ports the 41 commits made
here since the extraction, so the shared crate now has everything this copy
had, and PhotoCraft depends on it.

craft-cms returns errors where the local crate panicked on caller input:
transforms, tables and LUT constructors return Result. Call sites propagate
the error where the function already returns one, and fall back where the
arguments are fixed by construction (each with a comment saying why).
Lut3d's fields are private there; the proof and HDR display table is built
with Lut3d::from_fn.

The pin is the head of the craft-libs branch and moves to main when that
pull request merges.
2026-11-11 19:41:51 +00:00
David Mann 00f9b7d60d Merge pull request #13106 from rmsff/fix/art-history-brush-depth-refused-12637
Art History Brush: refuse 16- and 32-bit documents with the reference texts
2026-11-11 14:25:30 +01:00
Tanish Manku 28d2b499b5 Merge pull request #11062 from yoriswind/codex/artboard-move-overflow
Reject cross-artboard moves whose required translation overflows
2026-11-11 00:27:05 -07:00
Tanish Manku 6c8140daf4 Merge pull request #10896 from yoriswind/codex/fill-dialog-mask-target
Fix Fill and Stroke for targeted masks
2026-11-11 00:24:24 -07:00
Tanish Manku dc855ae902 Merge pull request #6864 from hidoba/codex/curves-followup-fixes
Fix remaining grayscale Levels/Curves target mismatches
2026-11-10 23:57:32 -07:00
Tanish Manku c2e8c4db82 Merge pull request #6787 from ingling/spot-dot-gain
Color Settings › Spot: dot gain for spot channel and Multichannel ink previews
2026-11-10 23:57:09 -07:00
rmsff 6804a0b8da Art History Brush: refuse 16- and 32-bit documents with the reference texts
The brush works in 8-bit documents only: a 16-bit document with one
layer, a layered 16-bit document or a depth change after the source,
and a 32-bit document each get the reference application's alert text,
before anything is painted. A source of another colour mode gets the
reference text too. Tests that expected 16/32-bit painting now run at
8 bits.
2026-11-11 05:56:48 +03:00
David Mann 6a712d54c9 Merge pull request #12908 from hectorviov/fix/eraser-gray-background
Eraser and Fill: background swatch through the Grayscale document's grey profile (#11940)
2026-11-11 02:00:53 +01:00
David Mann d58afecac9 Merge pull request #12244 from ElNeMeR70/fix/gradient-live-drops-selection-12196
fix(engine): drop selection after masking a live Gradient Fill layer
2026-11-11 00:53:39 +01:00
Vlad Grankovsky 333566a616 Merge upstream main 609e2aa72 into curves follow-up 2026-11-10 19:51:17 +01:00
Hector Villarreal 7b20000052 Grayscale swatch through sGray, as agreed on the PR (#11940)
The reference's Eraser paints 173 for background RGB 0,200,0 in a Grayscale
document; the document's Dot Gain curve gives 153, so swatch_in_doc now
converts through the sRGB tone curve (sGray, 172-173) instead. Pixel
conversions keep the document's profile. The two Grayscale tests are no
longer ignored, and eraser_locked's Gray case checks the sGray value, since
the Brush's own conversion into Gray (not measured) is unchanged.
2026-11-10 08:37:07 -06:00
rmsff 6106c825e7 Red Eye: name the step Red Eye Removal Tool and record a click that changes nothing
A click that runs but changes no pixel (a blue pupil, a transparent area, an
empty layer, Darken Amount 0) now adds one unchanged history state instead of
the "no red-eye pixels" error, as in Photoshop. Non-RGB/Lab documents, channel
and mask targets, hidden layers and clicks outside the selection or the canvas
keep the error and add no state.
2026-11-10 13:56:00 +03:00