Implement in-stack transform tool preview
NOTE: this patch is against krita/4.3 branch, though I'm not sure that it should be included into the next release. It should be discussed separately.
The patch implements the in-stack transform tool preview, like it was proposed in this task. Basically, the user can now see the final result of the transformation with all the blending options and masks right when modifying the transformation.
The patch also implements "forced instant preview" configuration option for move tool and filter application. It activates instant preview for these tools even when it is disabled in the View->Instant Preview menu. It may be useful, because instant preview for brushes may be irritating for some users.
Testing Packages
-
Windows (x64):
-
Linux (x64):
use this command line to avoid slow exiting:
LSAN_OPTIONS=detect_leaks=0 ./krita-4.4.3-alpha-054d8c7-x86_64.appimage
Test Plan
The patch touches the core functionality of the scheduler, so it needs really extensive testing. I'm sorry for that :)
- By default, in-stack preview in enabled. So test transform tool (free-transform + mesh modes) on the folloing layer types:
- paint layer
- paint layer with a transparency mask
- paint layer with a transform mask (free-transform + mesh) [bugs may hide here!]
- clone layer
- clone layer with a transparency mask
- clone layer with a transform mask (free-transform + mesh) [bugs may hide here!]
- group layer with children
- vector layer [bugs may hide here!]
- selection mask (with red overlay)
- colorize mask (should do nothing)
- paint layer with colorize mask (there should be no data loss at least)
- Go to preferences, disable in-stack preview, and check if the actions above still work (no Krita restart is needed). Verify that the the preview is now painted in overlay above all the existing layers.
- Test Move Tool. Test on 8000x8000 image.
- When
Force Instant Preview
option is disabled, the tool should be very slow whenView->Instant Preview
in unchecked. - When
Force Instant Preview
option is enabled, the tool should have the same speed whatever the state ofView->Instant Preview
is
- When
- Test Filters. Test Gaussian Blur (or any slow filter) on 8000x8000 image using "Filters" dialog (not Fill Layer, they are unaffected by the patch).
- When
Force Instant Preview
option is disabled, the filter should be very slow whenView->Instant Preview
in unchecked. - When
Force Instant Preview
option is enabled, the filter should have the same speed whatever the state ofView->Instant Preview
is
- When
Formalities Checklist
-
I confirmed this builds. -
I confirmed Krita ran and the relevant functions work. -
I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!) -
I made sure my commits build individually and have good descriptions as per KDE guidelines. -
I made sure my code conforms to the standards set in the HACKING file. -
I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.