Run the existing Clippy, dependency layering and scorecard checks before the test passes so failures are reported earlier.
Preserve the existing commands, test coverage and runtime limits. Linux, Windows, corpus, WASM, web and packaging checks passed.
Choose PSB block length width from the canonical big-endian key before converting the key for little-endian TIFF output. Preserve foreign payloads, padding and conversion of following blocks.
Addresses #5599, finding 2 only.
Fixes#6104.
Cancelling a 24 MP Gaussian Blur r 50 job took up to ~400 ms (P25, budget
200 ms max). Stage timings showed two stretches without a cancel check:
- The transparency-lock pass (keep_alpha) that puts a Background layer's
alpha back after the filter ran serially over every changed tile, about
400-450 ms on 24 MP, with no cancel check. It now fixes the tiles in
parallel, each in its own scratch surface, and checks for cancellation
before each tile. Results are bit-identical to the serial pass (tested
against it at 8, 16 and 32-bit).
- Box-blur column strips checked only before each strip; with ~31 strips
per band and 32 threads one strip is tens of ms. line_passes now checks
between passes.
P25 max: 337-399 ms -> 13-44 ms over five runs. The uncancelled job is
also faster: p50 about 690 -> 400 ms.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Preflight oversized pixmaps and conversion peak before allocating.
Only charge the U8 retained-surface allowance after render succeeds.
Clarify the warning and cover later small raster groups with regressions.
Merge upstream main to refresh the pull request branch.
With a painting tool, Shift+Alt+right-press on the canvas opens a floating
hue strip and saturation/value square under the pointer. While the right
button stays down, moving over the HUD sets the foreground colour live
(coalesced tools.setColors, one history step); release keeps it, Escape
restores the starting colour. Alt+right-drag brush resize now requires
Shift not be held, so the two gestures stay distinct. Agents drive it with
ui.pointer button=right shift+alt (down opens, up closes).
Tool options and the selected tool were already remembered (tool_memory, #2814), but
each painting tool's own brush (UiState.tool_brushes) was lost at quit, and the tool that
owned the session brush restarted as the Brush, so after quitting with the Eraser its
brush became the Brush's.
- Preferences.toolBrushes {owner, brushes}: saved change-driven when the pointer is up and
on exit, restored at launch with stored tips as references (loaded on swap).
- brush_cmds::remembered_settings / restored_settings: shared with lastBrush; restored
brushes pass the tools.setBrush checks and are clamped (size, hardness, opacity, flow,
smoothing).
- tool_memory::sanitize clamps restored tool options to their options-bar ranges.
- Reset Tool / Reset All Tools clear the persisted state through the same path.
- Scorecard UI-217-1 note updated (stays partial: font recents).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Preferences > File Handling > Save in Background was never read. Saves
already run as a background job; the setting now picks how the app
waits for it, as in Photoshop:
- On (default): you keep working while the file is written; progress
shows in the document tab and the status bar. The modal progress
dialog no longer appears for these saves.
- Off: the same job, worker and atomic write, but the modal progress
dialog shows at once and no shortcut reaches the app until the file
is complete; a close or quit asked for meanwhile waits for it.
The setting now shows in Edit > Preferences. Prefs audit: settings that
do nothing 26 -> 25 of 166.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Keep capture and visible-label assertions GPU independent. Add opt-in checked snapshots at both scales under the existing GPU lock and Nextest group, with a fresh-output command that rejects empty test selections.
Assisted-by: OpenAI Codex (GPT-6)
Signed-off-by: IanHollow <72767437+IanHollow@users.noreply.github.com>
The cell's count was refreshed to 4/4/2 but its prose still called
manual kerning and type on a path missing; the scorecard has kerning
done and type on a path partial.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checks that only need a pattern's id (Pattern Stamp's enabled state, the
Patterns panel's move, the New Pattern Fill dialog) now use
pattern_cmds::resolve_id and never read pixels. The preset store keeps
the last pattern it read in full, so painting with the same 4500 px
texture again doesn't re-read tens of megabytes per stroke.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
.atn import maps 116 events (was 112). Three more third-party sets import:
COPYCAT 44 -> 0 unmapped steps (all three actions play end to end with its
.pat), Line and Color 3 -> 0, AJ_Actions2023 8 -> 4 (Lens Correction with a
recorded lens profile stays unmapped; Timeline frame steps and an empty Set
are switched off).
- .atn: Create Clipping Mask (groupEvent), Apply Locking and layer lock /
Advanced Blending sets, Diffuse, New Snapshot (replace existing), Clear
History, deleting a layer mask by Msk and a smart filter mask, smart filter
Blending Options, Shift-click layer ranges, Select and Mask's newer
"output to selection".
- Engine: history.clear (History panel menu, snapshots kept);
history.newSnapshot replaceExisting; layer.smartFilter.deleteFilterMask
ifPresent (Photoshop adds that mask by default); Bring to Front / Send to
Back of a layer already there is a no-op, not an error.
- Playback: Save in an Edit Contents document saves into the smart object
(headless and in the desktop shell, which failed for want of a path).
- Patterns persist in the preset store: patterns.json plus one .pat per
pattern; patterns over 128 px open as a preview and load at full size on
use, so gigabyte texture libraries cost nothing at start. Corrupt files are
skipped and never overwritten. The Patterns panel no longer prunes folder
entries before the store has loaded.
- Select and Mask Shift Edge: +-100% moves the edge by its soft width
(radius, feather or smooth; 1 px for a hard edge), was a fixed 4 px, which
left a solid black band around Debaser's distressed ink.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both quoted stale Type checklist counts (3/2/4 and 0/3/6); the
regenerated scorecard has 4 done, 4 partial, 2 missing with area type
(TYPE-218-10) as partial. The Type figure (40%) is an estimate this work
does not re-measure, so it and every percentage stay as they were; the
parity doc gets its status line and a revision-history row, per AGENTS.md
section 4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three area layouts had no test: a word too wide for a U's narrow arm
starting the text in the wide arm on the same row, two paragraphs stacked
one leading plus space-before apart inside a shape, and justified lines
filling their spans in an ellipse with the last line left flush. The
justify test fails when the paragraph is set flush left.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
area_metrics copied the line loop's ascent, descent and leading rules,
so a change to one would silently desynchronise area rows from the lines
stacked on them. Both now call line_metrics. No behaviour change: the
fallback style is the same paragraph-start style, and the line loop's
style lookup now uses get() instead of indexing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
with_text already refuses a locked type layer (check_text_unlocked, the
same effective-lock test), so the check in fill_path only duplicated it
with a different message.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The TYPE-218-10 note said type.fillPath still worked on paths beyond the
Type tool's click cap; it never did for curved paths, and it now refuses
them with "too many anchor points". The note says what a click and the
command each do, and docs/scorecard.md is regenerated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
type.fillPath accepted up to 100,000 anchors, but each curved segment
flattens to 16 edges against a 65,536-edge cap, so a big curved path
failed with the misleading "the path encloses no area".
The anchor limit now lives in photocraft_text::area as MAX_AREA_KNOTS
(4096, the Type tool's existing click cap) and the edge cap is derived
from it (4096 x 17), so every path within the limit fits even with every
segment curved, and a bigger one gets "the path has too many anchor
points". The Type tool's click cap now names the same constant, so a
path it offers as an area target can always be filled.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PSD export, Release Type from Path and the type transform box all took
the area path's control_bounds() as given. A path from a file can hold
NaN, infinite or huge coordinates, and f64::min skips a NaN, so those
bounds could be NaN, infinite, or finite while the path itself is not;
they then became a NaN BoxBounds in the PSD or a NaN text box.
photocraft_text::area::path_bounds returns the bounds only when every
point is finite and within the area module's 1e7 coordinate limit (the
paths AreaShape accepts). PSD export then saves point text, release
returns an error, and the transform box falls back to the layout bounds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Type tool hover calls hit_layer every frame over a path, and it laid
out each candidate layer even when the layer's shown pixels already
answered the hit. It now returns as soon as the pixels hit; the result
is unchanged because the pixel hit was or'ed in anyway.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With View > Show > Target Path (or Extras) off the canvas draws no path,
yet a Type tool click still turned into area or path type on it. The
target now uses the same check the canvas uses to draw the path, so a
click on a hidden path makes plain point text and the pointer agrees.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A component made only of open subpaths has no edges. Folded in with
Intersect it emptied every row, so an open path left in a shape layer's
path stopped all area text. Such components are now skipped, as they add
no fill.
Every row folds in each component, so the count is also capped (4096) to
keep a path of thousands of tiny shapes from making each line cost
thousands of interval merges; past the cap the path gives no area, like
the existing edge cap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A speech bubble (an ellipse combined with a tail) split every row that
crossed the tail: spans() blocked the x-range swept by every edge in the
band, including the tail's edges hidden inside the ellipse's fill.
Each component now gives the x-ranges inside it for the whole band
(middle-row inside minus its own swept edges) and those inside it on some
row (middle-row inside plus its swept edges). The components fold with
their ops: Combine/Join unite the whole ranges, Subtract removes
everything the cut ever covers, Intersect keeps what both hold throughout,
and Exclude keeps what one holds throughout and the other never touches.
Fill rules still apply within a component, so holes stay holes and text
never sits over a cutout.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A shape below 100 % Density renders over the whole canvas, and a Feather
grows its pixels, so Free Transform, the Move tool's transform controls,
snapping and Properties > Transform framed the canvas or the blur. As in
Photoshop the frame now follows the path and stroke whatever the mask
Density and Feather: photocraft_compose::hard_shape_bounds (shape_bounds
without the soft reach) feeds whole_layer_bounds and the Properties
Transform fields. Rendering keeps the soft bounds; other layers and hard
shapes are unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Area type is partial: PSD saves it as paragraph text over the path's
bounds, and mixed type sizes in one area paragraph space at the largest
line. Also notes the 4096-anchor click limit and overflow of words wider
than every span. TYPE-218-1 now credits the Type tool click on an outline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>