Skip to content

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.

Screenshot_20201126_221540

Testing Packages

Test Plan

The patch touches the core functionality of the scheduler, so it needs really extensive testing. I'm sorry for that :)

  1. By default, in-stack preview in enabled. So test transform tool (free-transform + mesh modes) on the folloing layer types:
    1. paint layer
    2. paint layer with a transparency mask
    3. paint layer with a transform mask (free-transform + mesh) [bugs may hide here!]
    4. clone layer
    5. clone layer with a transparency mask
    6. clone layer with a transform mask (free-transform + mesh) [bugs may hide here!]
    7. group layer with children
    8. vector layer [bugs may hide here!]
    9. selection mask (with red overlay)
    10. colorize mask (should do nothing)
    11. paint layer with colorize mask (there should be no data loss at least)
  2. 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.
  3. Test Move Tool. Test on 8000x8000 image.
    • When Force Instant Preview option is disabled, the tool should be very slow when View->Instant Preview in unchecked.
    • When Force Instant Preview option is enabled, the tool should have the same speed whatever the state of View->Instant Preview is
  4. 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 when View->Instant Preview in unchecked.
    • When Force Instant Preview option is enabled, the filter should have the same speed whatever the state of View->Instant Preview is

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.
Edited by Dmitry Kazakov

Merge request reports