Commit Graph
456 Commits
Author SHA1 Message Date
qvest-ssels 5ec2e5a7a9 fix(compose): honour Anti-aliased for the Drop Shadow map (#14881)
The Drop Shadow now takes the same third-of-a-pixel source offset the
Inner Shadow takes since #14934, through the same aa_shift gate (Gaussian
contour, no dilating Spread, a blur wider than the identity), on the CPU
(shadow_map) and the GPU map program (B::shadow). On the issue's document
the edges land within 2 levels of the measured profiles; the flag off
keeps every map bit-for-bit.
2026-11-28 16:54:44 +01:00
David Mann 3597c13275 Merge #15766 into the merge queue batch
Cover translucent raster pixels with Inside and Center strokes (#15002)
2026-11-27 12:08:38 +01:00
Dan d2dec04f01 Invalidate group effect maps when a child changes type 2026-11-26 18:27:10 +00:00
David Mann 44c2a2937d Merge #16479 into the merge queue batch
Patterns paint the grey profile's greys in Grayscale documents (#14975)
2026-11-25 17:31:39 +01:00
David Mann ec236094ca Merge #16638 into the merge queue batch
fix(tools): a pattern from an Indexed image keeps painting (#13071)
2026-11-25 13:28:24 +01:00
f2ac09d2ec Fix-up for #11756: Align Edges as the reference application renders it
The PR snapped shapes with a per-edge heuristic (pixel_align.rs, dash-cap tie
rules, a PSD coordinate-frame field threaded through engine, format and caches),
defaulted the option to off, and renamed the existing Rectangle/Triangle
"Align Edges" checkbox to "Snap Bounding Box" next to a second checkbox.

The reference application fits the whole shape at render time: the bounds of
what it paints (fill, or the stroke's outer edge) get a whole-pixel left/top
(a half rounds up) and a whole width/height, and the path is translated and
scaled into that box. Fill and stroke take one transform; curves stay
antialiased; inner edges of several subpaths are not snapped.

- photocraft_vector::align_edges implements that rule; CompiledShape applies it,
  so caches, the compositor, previews and extents agree; the fill/stroke split
  under layer effects starts from the whole shape's transform.
- Removed pixel_align.rs, the rasterizer helpers it needed, the document-space
  drag preview and psd_coordinate_frame (rounding the bounds absorbs the PSD
  quantization it was for).
- One Align Edges checkbox (ToolOptions::align_edges, stored and scripted as
  useAlignedRendering, older align_edges still read) on every shape tool and the
  Pen, on by default and after Reset Tool; it snaps the drag and sets the layer.
- PSD sn2P: written as 1 when on and left out when off, as the reference saves it.
- Dropped the dead path.set param, moved the control-protocol paragraph,
  rewrote docs/pixel-aligned-strokes.md, reverted the unrelated raw, font,
  Cargo and test-harness changes.
- Tests reproduce the measured cases (rectangles at .25/.4/.5/.6/.75, ellipse
  extremes and curve symmetry, 1/2/3 px strokes, rotated rect, Pen triangle,
  two subpaths, toggle off, stored path unchanged, one checkbox, Reset Tool).

Co-Authored-By: superplay2021 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 13:02:42 +01:00
hnoerenberg 818a4a010d feat(doc): patterns record the colour mode they were defined from
Edit > Define Pattern composites the area in the document's pixel format, which stores an Indexed Color document expanded to RGB. Nothing on Pattern said where the tile came from, so a pattern taken from an Indexed image was indistinguishable from an RGB one, and a tool that cares about the difference had nothing to read.

The new field names the source mode. The pixels, the id and what the pattern library lists stay as they were. A pattern read from a file records no source: a .pat or PSD block says what its pixels are, not which document they came from. The library index and .pcraft carry the field, so a defined pattern keeps its source across a restart or a save; files written before it read as no source.
2026-11-24 11:22:16 +01:00
ljkx 1bf4056082 Merge remote-tracking branch 'origin/main' into fix/14975-pattern-grayscale-greys
Main's engine split step 7 moved the paint modules to crates/engine-paint and
the pattern mode tests to the engine crate's tests/it:

- cmd/fill_cmds.rs was deleted from engine-core (git saw no rename): Edit >
  Fill's pattern tile is built in PatternSpace::of_pixels(doc) in
  crates/engine-paint/src/cmd/fill_cmds.rs.
- cmd/paint_cmds.rs followed its rename.
- pattern_mode_tests.rs is crates/engine/tests/it/paint_in_pattern_mode.rs:
  the tests this branch added start from the facade's Session::new(), which
  installs the commands, like the two that moved.

# Conflicts:
#	crates/engine-core/src/cmd/fill_cmds.rs
2026-11-24 01:27:05 +01:00
superplay2021 47790f5e0d Merge latest main and resolve Align Edges conflicts 2026-11-23 21:25:02 +02:00
ljkx ed726ead5c Patterns keep the luma greys where #14975 did not measure
The grey-profile conversion was keyed by the document's pixel-format colour
mode, so it reached more than the 8- and 16-bit Grayscale documents the
issue measured:

- 32-bit Grayscale documents;
- Duotone and Bitmap documents (their pixel format is Grayscale);
- Grayscale documents tagged with another grey profile (the transform
  always targets sGray);
- Image > Mode > Bitmap's Custom Pattern thresholds, which ask for the
  pattern in ColorMode::Grayscale.

The issue lists the first three as not measured, to keep their behaviour.

The conversion is now keyed by compose::pattern::PatternSpace.
PatternSpace::of(doc) is ProfileGray only for an 8- or 16-bit Grayscale
document in the default grey working space (untagged, or tagged with the
default grey profile, as swatch_in_doc asks of the document); every other
document, and every caller that names a colour mode, gets Mode(mode), the
pixel-format conversion main has. Edit > Fill and the Paint Bucket build
their tile in PatternSpace::of_pixels(doc), so they keep painting what a
pattern fill layer paints. The GPU compositor's pattern cache is keyed by
the same space.

PSD and layered-TIFF export render a pattern fill layer's stored pixels in
that space too (render_fill_content_in). They were rendered from the
pattern's own colours and converted by the pixel format, so a Grayscale
document's pattern fill layer reopened with the luma greys:
pattern_fill_survives_psd_and_layered_tiff_in_every_mode failed with
"Grayscale/U8 x.psd: the reopened pattern fill differs by 0.028272122".

The two engine tests this branch added started from a core Session::new(),
which installs no commands: they failed with NotInstalled when run alone,
as nextest runs them. They start from crate::session().
2026-11-23 18:10:16 +01:00
David Mann 42236a89fa Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	crates/engine-core/Cargo.toml
#	crates/ipp/Cargo.toml
#	crates/ui-egui/src/tools/analysis/tests.rs
2026-11-23 14:58:08 +01:00
Dylan M. Taylor 6f20a6b9f2 gpu, camera_raw: develop Detail on the GPU using craft_develop (#13519, #587) (#16480)
* gpu,camera_raw: develop Detail on the GPU using craft_develop::camera_raw (#13519, #587)

* ui-egui/camera_raw_gpu: remove temporary gpu_stages Detail filter (#16485)
2026-11-23 08:55:17 -05:00
David Mann a461a65ceb Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	Cargo.lock
#	Cargo.toml
2026-11-23 13:08:36 +01:00
FredApps c77a928370 Merge remote-tracking branch 'upstream/main' into onee/k8s-gate-test-hardening 2026-11-23 12:54:06 +07:00
p0rpsandfjamesprice 6fff6629f9 build: move craft-develop to craft-libs main b2d2a1e9 (craft-libs#3101) (#16485)
* build: move craft-develop to craft-libs main b2d2a1e9 (craft-libs#3101)

craft-develop and craft-develop-model move from 33be356 to b2d2a1e9,
which includes craft-libs#3101 (Detail's resolved parameters) and four
sensor commits (white-balanced demosaic with a clip mask; existing
signatures unchanged). Cargo.lock changes only craft-libs git sources.

per_pixel() no longer refuses Detail: it returns the stages with
`detail` set. RAW Develop's GPU pass has no Detail stage yet (#6916), so
the dialog now goes through gpu_stages(), which keeps a sharpened or
noise-reduced frame on the CPU. A device-free test covers it on hosted
CI; the GPU test adds Detail-only cases; the gpu crate's test follows
the new per_pixel contract.

* style(camera-raw): rustfmt gpu_stages' signature

---------

Co-authored-by: fjamesprice <[email protected]>
2026-11-23 00:20:24 -05:00
David Mann d321a2db62 Merge #15085 into the merge queue batch
fix(compose): Inner Shadow size 1 draws the measured pixel
2026-11-23 01:58:00 +01:00
David Mann 0cf81b45b5 Merge #8222 into the merge queue batch
Channel Mixer in CMYK documents mixes cyan, magenta, yellow and black (#8047)
2026-11-23 01:57:59 +01:00
Dylan M. Taylor 309e4c7a65 camera_raw: preserve legacy filter renders and native preview (#16419) 2026-11-22 12:57:39 -05:00
Higgs32584andClaude Opus 5.5 b0e95488da Merge upstream main into fix/8047-channel-mixer-cmyk
Keeps both test modules in crates/format/tests/it/main.rs: main's camera_raw_roundtrip and this PR's channel_mixer_cmyk.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-22 12:56:48 -05:00
Dan db5bacddbb Merge upstream main into codex/15002-stroke-partial-alpha 2026-11-22 17:47:29 +00:00
FredApps 4993baf24d Merge branch 'main' into onee/k8s-gate-test-hardening 2026-11-22 23:11:50 +07:00
Dylan M. Taylor 65fc546bba raw, camera_raw: adopt craft-develop 7631ed550 and add explicit parity tests (#587) (#16393)
* raw,camera_raw: bump craft-develop to 7631ed550 and add explicit parity tests (#587)

* raw,camera_raw: cut over develop_sensor demosaic and camera_raw::develop to craft_develop (#587)

* raw,camera_raw: fix craft_develop field names and test imports (#587)

* camera_raw: fix clippy excessive_precision and unnecessary cast lints

* raw,camera_raw: use exact gaussian_taps for sharpening, silence camera_raw_gpu dead_code, update post-cutover pins

* raw,camera_raw: fix highlights sign, <0.3px sharpen noop, non-Bayer/fused parity, and gpu test ignores

* engine: update camera_raw_filter_legacy_baseline_pixels to post-cutover craft_develop baseline

* raw,camera_raw: early-exit noop sharpen, exact full desat, PAD=6 fused margin

* raw,camera_raw: guard <0.3px texture/clarity blur and route fused band demosaic through craft_develop

* io: update default RAW Open baseline pins for craft_develop::sensor::demosaic reflect borders

* io: add Windows libm FNV-1a hash pins for RAW Open baselines
2026-11-22 10:36:03 -05:00
FredApps a052dd819e test: harden the three k8s gate flakes on GLES and memory pressure
The artcraft k8s main runners fail every_compositor_pipeline_builds with a
GLES adapter-context deadlock, mcp_wait with a 6000x6000 Gaussian Blur that
runs out of working memory, and occasionally hostile_modules_fail_quickly
when memory.grow is slow. Hosted ubuntu-24.04 and Windows stay green, and
the same tests have both passed and failed on k8s without a product-code
change. Serialize GL pipeline builds and the mcp_wait filters, and give the
hostile-module wall-clock bound more room.
2026-11-22 22:24:37 +07:00
David Mann 1ed2fa74ab Merge PR #16047: test(gpu): pay one CPU reference and one render set per parity check 2026-11-22 13:25:16 +01:00
David Mann 9889a02f2d Merge PR #16173: #15929: build the compositor pipelines with FXC once, not twice 2026-11-22 13:24:48 +01:00
David Mann 189ba8fcbc Merge PR #16151: #15928: Camera Raw GPU tests run one integer depth and float per case 2026-11-22 13:24:39 +01:00
David Mann 51a18f6096 Merge PR #15198: fix(fill): keep opaque Dissolve fills fully covered 2026-11-22 00:26:37 +01:00
RickiNano 63253358bc #15929: drop the time share from the second-pass comment
The CI runners saved about a quarter of the test, not half.
2026-11-21 14:47:00 +01:00
RickiNano e22a775246 #15929: build the compositor pipelines with FXC once, not twice
`pipelines::every_compositor_pipeline_builds` builds every pipeline with
FXC on DX12, then again on every backend with `Dx12Compiler::Auto`.
Without `dxcompiler.dll` on the search path, as on the Windows runners,
`Auto` falls back to FXC, so the second DX12 pass repeated the first.
The second pass now names DXC, so DX12 drops out of it when DXC does not
load and is built through DXC when it does. The Windows adapter and
device checks stay on the FXC pass.
2026-11-21 14:19:55 +01:00
RickiNano c877585a7f #15928: Camera Raw GPU tests run one integer depth and float per case
8 and 16 bits both develop with `float = false`, so they share every
line of the CPU develop and the pass; cases alternate between them so
both quantizations still run. Tiny frames run one depth per size, flat
frames and the dehaze tower (not quantized) drop the identical 16-bit
run, the dehaze cache test runs on an 858-wide strip (the cache key
doesn't hold the size), and the shadows-only 858-wide strip is left to
the clarity test's strip, whose case has Shadows and Highlights too.
2026-11-21 13:20:50 +01:00
hnoerenberg ffad734425 test(gpu): keep absent tiles in the changed-mask-default parity check
The 300 x 260 trim put the far mask patch at (230,190,300,260), which touches
all four tiles of the mask's 2 x 2 resident span: no tile stayed absent, so the
branch #2422 is about (cells.rs: a missing tile in a new resident texture gets
the mask default pixel) was unreachable and the check passed with that line
neutered. The far patch now starts on the 256 px boundary, (256,256,300,260),
so tiles (1,0) and (0,1) stay absent; with cells.rs:431 neutered the test fails
again at this geometry ("mask default 1: max diff 246.16/255 at (282,208)",
inside the absent tile column). The document stays 300 x 260.

Comment truths: the disjoint-damages note called the second stroke series'
rectangles "all new" - they are new damage rectangles, not new cached pixels
(the chunk they land in is already resident), which is what whole-chunk
admission is about; the incremental-updates note called the painted area "one
256 px tile" in a document that spans a 2 x 2 tile grid.
2026-11-21 04:49:43 +01:00
hnoerenberg 5da6827fb2 test(gpu): pay one CPU reference and one render set per parity check
The 77 GPU parity tests render the CPU reference and both compositors per
check; several tests then rendered the same document again for a ramp or a
Stats field, and several documents were far larger than the branches they
drive. `diff_rect_full` keeps one pass's pixels and stats so no test renders
a document it just compared a second time; the oversized documents shrink to
the smallest size that still crosses the 256 px tiles and pages they are
about, and the gated Inner Shadow rows compare over the shape instead of the
whole 400 x 300 canvas.

No branch is dropped: every assertion, tolerance and check count stays, the
big-document tests keep their measured documents, and the issue's two
mutation checks plus a tile-share mutation still fail against this harness.
2026-11-21 03:10:08 +01:00
Higgs32584andClaude Opus 5.5 3356714009 Merge upstream main into fix/8047-channel-mixer-cmyk
Resolve the conflict in crates/engine/src/adjust_params.rs: keep this
branch's generic mixer_row (RGB rows of 4, ink rows of 5) and main's
rounding to whole percentages before clamping (#14414).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-20 18:57:10 -05:00
superplay2021 00d838bd66 Merge latest main and resolve Align Edges conflicts 2026-11-20 20:11:10 +02:00
hnoerenberg a8f4d243be Merge upstream/main into fix/inner-shadow-size-one-14933
# Conflicts:
#	crates/compose/src/effects.rs
#	crates/gpu/src/fx/builders.rs
#	crates/gpu/src/fx/tests.rs
2026-11-20 18:26:55 +01:00
David Mann 59147c730c Merge #15112 into the merge queue batch
fix(compose): honour Anti-aliased for the Inner Shadow map
2026-11-20 15:52:16 +01:00
David Mann 1a97ade598 Merge #15735 into the merge queue batch
fix(compose): draw a one-pixel Size 1 Inner Glow
2026-11-20 14:16:36 +01:00
David Mann 95af987938 Merge #15013 into the merge queue batch
Gradient Map: keep the gradient's lightness in Grayscale documents (#14698)
2026-11-20 14:16:34 +01:00
hnoerenberg 8b1af24cb8 Merge upstream/main into fix/inner-shadow-antialiased-14934 2026-11-20 14:14:18 +01:00
hnoerenberg 900e9bbd02 Merge upstream/main into fix/inner-shadow-size-one-14933
# Conflicts:
#	crates/compose/src/effects.rs
2026-11-20 10:37:46 +01:00
superplay2021 31de878f08 Merge latest main and resolve Align Edges conflicts 2026-11-20 04:44:04 +02:00
David Mann bb4dc343b3 Merge #15420 into the merge queue batch
fix(compose): fade split Blend If points over both ends in 8-bit documents (#14855)
2026-11-20 02:04:37 +01:00
David Mann 968d74adee Merge #15282 into the merge queue batch
Layer Style: Satin's Invert flips the result after the contour (#14981)
2026-11-20 02:04:36 +01:00
Higgs32584andClaude Opus 5.5 e92804520d Merge upstream main into fix/8047-channel-mixer-cmyk
main moved the command table out of crates/engine/src/cmd.rs into crates/engine/src/cmd/table/. cmd.rs takes main's version; this PR's Channel Mixer params doc (cyan/magenta/yellow/black ink outputs, monochrome unsupported for CMYK outputs) now lives on the channelMixer entry in cmd/table/image/adjustments.rs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-19 15:53:45 -05:00
David Mann 3674da4f9d Merge pull request #10537 from admiralronton/fix/bevel-gloss-high-altitude
Bevel gloss contour: split at the unmapped sin(altitude) (#594)
2026-11-19 18:58:15 +01:00
Michael Higgins 9888613806 Merge branch 'storytold:main' into fix/8047-channel-mixer-cmyk 2026-11-19 10:19:01 -05:00
Dan db9e175cd0 Merge remote-tracking branch 'origin/main' into codex/15002-stroke-partial-alpha 2026-11-19 15:03:25 +00:00
aiongg 2f6f4cd7cc Merge pull request #15730 from FredApps/speed-gpu-fixtures-15707
Use strips for Camera Raw parity tests
2026-11-19 10:00:24 -05:00
Dan 5299ae0fab Cover translucent raster interiors with Inside and Center strokes 2026-11-19 14:58:29 +00:00
hnoerenberg 3a06f56045 Merge upstream/main into fix/inner-shadow-antialiased-14934 2026-11-19 14:13:40 +01:00