Repository navigation
LR-VIEW-ZOOM: dragging a mask keeps the photo sharp (#1679) - #4444
john01px2022 wants to merge 1 commit into
Conversation
A drag of a mask's handle, body or pin is an interaction, so the loupe drafted it like a slider drag: at 0.6 of full size on the CPU, or once its full-size drafts had been slow. A mask edit changes part of the photo, and the whole photo went soft for it. Its drafts (region::SHARP_DRAG, the "Edit Mask" interaction) are now always full size, on the CPU too, and never drop to 0.6 mid-drag. A slow machine shows fewer drafts instead. Slider drags are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
vangel76
left a comment
There was a problem hiding this comment.
Reviewed 3efa9c8c. I checked the sharp-drag path, quality adaptation, and the comparison with slider drafts. I found some avoidable work in the exempt path.
Source review only. I did not build the project, run tests, or check CI.
| && median_after_first(&self.samples).is_some_and(|m| m > DRAFT_BUDGET_MS * GIVE_UP_FACTOR) | ||
| && let Some((_, s)) = self.current.as_mut() | ||
| && let Some(((_, control), s)) = self.current.as_mut() | ||
| && control != SHARP_DRAG |
There was a problem hiding this comment.
P3. Keep sharp drags out of quality-adaptation sampling. The exempt drag still copies and sorts samples for the median after the cutoff and then ignores the verdict. Finishing also records an entry in the shared history used by sliders. Bypass measurement and recording for the exempt drag. The existing regression can assert that it leaves no adaptation verdict while slider adaptation still works.
Adapted from upstream #4444: region::SHARP_DRAG names the "Edit Mask" interaction; DragScale keeps its drafts at full size on the CPU too and never gives up to CPU_DRAFT_SCALE mid-drag. The fork begins that interaction in three places in panels/detail.rs (gradient body, grip drag, mask keys); all use the constant. Test brought over. Manual: none, no user-visible change beyond sharper drafts. Co-authored-by: tecari0 <121329615+tecari0@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wanikhawar
left a comment
There was a problem hiding this comment.
Conflicts with main, please rebase. The change reads correctly.
Part of #1679 (mask drags; slider drags are unchanged).
Problem
While you drag a radial or linear gradient's handle, body or pin, the whole photo goes soft, and sharpens again on release. A mask drag is an interaction, so the loupe drafts it like a slider drag: at
region::CPU_DRAFT_SCALE(0.6) where the GPU doesn't draw the view, or once that control's full-size drafts on this photo were judged slow (mask re-evaluation, #1145, makes that likely). The edit changes part of the photo, but all of it drops to 0.6.Change
region.rs:SHARP_DRAGnames the mask-edit interaction ("Edit Mask").DragScale::scalegives it full size whatever the GPU or verdict, andobservenever gives up on full size for it mid-drag.panels/detail/masks.rs: the twodevelop.beginInteractioncalls for mask edits use the constant.Not in this PR: slider drags (#1679's wider ask; a setting for that would be its own PR). The draft still has no Lanczos display fit, as every draft.
Known limit: on a slow CPU-only machine a mask drag now shows fewer, full-size drafts instead of many small ones.
How it was checked
cargo xtask cipasses on this branch, rebased on currentmain(cargo xtask ci --quickpasses)region::tests::a_mask_edit_always_drafts_at_full_size(on the CPU, after slow drags, and far over budget mid-drag; a slider drag still drafts small)Merging
unsafe, build scripts, network access, spawned processes, deleted files, CI orxtaskgate changes: none.Checklist
tr(): no new textdocs/parity-checklist.mdupdated (LR-VIEW-ZOOM)🤖 Generated with Claude Code
Summary by CodeRabbit