Bug 422804

Summary: Layer Mask visibility on/off has no effect in latest builds
Product: [Applications] krita Reporter: Ahab Greybeard <ahab.greybeard>
Component: Filter LayersAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR Keywords: regression
Version: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Mask Problem .kra file for illustration

Description Ahab Greybeard 2020-06-11 09:22:14 UTC
Created attachment 129223 [details]
Mask Problem .kra file for illustration

SUMMARY
This bug is not present in the 4.3.0 beta-2 appimage but is present in the 4.3.1 alpha (git 741ba2a) and the 5.0.0 prealpha (git ce3a1a3) appimages.

If a layer mask or masks are applied to a paint layer then they work but turning them off/on has no effect.

I attach a .kra file for illustration and investigation.

STEPS TO REPRODUCE
1. Apply one or more layer masks to a paint layer. Use Transparency, Filter or Transform Masks or any combination.
[Note that the masks have the expected effect.]
2. Turn off the visibility of any mask or masks.
[Note that this has no effect on the on-screen image.]
3. Turn off the visibility of the paint layer and turn off all masks then turn on the visibility of the paint layer.
[Note that the mask visibility setting is now correctly shown]
4. Repeat step 3. and do some combination of on/off for different masks.

OBSERVED RESULT
The change in mask visibility is only shown after the paint layer has it's visibility turned off then on.

For a transform mask, there is an artifact of the untransformed state that persists for a few seconds before disappearing.

For a gaussian blur filter mask, there is an artifact that does not disappear unless the gaussin filter mask is reapplied and the paint layer visibility is turned off then on.

EXPECTED RESULT
Changing the visibility of the masks should give a rapid change in on-screen appearance with no artifacts.

SOFTWARE/OS VERSIONS
Krita

 Version: 5.0.0-prealpha (git ce3a1a3)
 Languages: en_GB, en, en, en_GB, en
 Hidpi: false

Qt

  Version (compiled): 5.12.8
  Version (loaded): 5.12.8

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 4.19.0-9-amd64
  Pretty Productname: Debian GNU/Linux 10 (buster)
  Product Type: debian
  Product Version: 10
  Desktop: MATE

OpenGL Info
 
  Vendor:  "NVIDIA Corporation" 
  Renderer:  "GeForce GTX 750 Ti/PCIe/SSE2" 
  Version:  "4.6.0 NVIDIA 440.82" 
  Shading language:  "4.60 NVIDIA" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
     Version: 4.6
     Supports deprecated functions true 
     is OpenGL ES: false 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsOpenGLES: true 
  isQtPreferOpenGLES: false 

ADDITIONAL INFORMATION
Comment 1 Dmitry Kazakov 2020-06-11 17:15:18 UTC
Git commit dc2d90691f5b6086c43ed4518dc13414ab5ec641 by Dmitry Kazakov.
Committed on 11/06/2020 at 17:15.
Pushed by dkazakov into branch 'krita/4.3'.

Fix updates of masks when changing visibility

The regression was caused by 94308fa2feb7264050d4548ac560a0fb9af0e46b

M  +3    -1    libs/image/kis_mask_projection_plane.cpp

https://invent.kde.org/graphics/krita/commit/dc2d90691f5b6086c43ed4518dc13414ab5ec641
Comment 2 Dmitry Kazakov 2020-06-11 17:15:36 UTC
Git commit 84452a8f7387f0ec116413144aa9ff10ec522001 by Dmitry Kazakov.
Committed on 11/06/2020 at 17:15.
Pushed by dkazakov into branch 'master'.

Fix updates of masks when changing visibility

The regression was caused by 94308fa2feb7264050d4548ac560a0fb9af0e46b

M  +3    -1    libs/image/kis_mask_projection_plane.cpp

https://invent.kde.org/graphics/krita/commit/84452a8f7387f0ec116413144aa9ff10ec522001