Bug 404935 - Window of another apps partially visible in Krita canvas
Summary: Window of another apps partially visible in Krita canvas
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: OpenGL Canvas (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 405679 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-03-01 01:01 UTC by nikola
Modified: 2019-03-26 20:40 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
another app visible thru transparent canvas (458.21 KB, image/png)
2019-03-01 01:01 UTC, nikola
Details
Transparency on Linux (310.90 KB, image/png)
2019-03-23 23:07 UTC, M
Details
Direct3D (179.56 KB, image/png)
2019-03-26 20:37 UTC, nikola
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nikola 2019-03-01 01:01:27 UTC
Created attachment 118456 [details]
another app visible thru transparent canvas

SUMMARY
Window of another apps behind Krita become visible partially when opacity of layer is less than 100%.
This bug only happen when OpenGL is active. Workaround is to use Direct3D 11 via Angle. 

STEPS TO REPRODUCE
1. Configure Krita to use OpenGL. Restart Krita.
2. File New
3. Change opacity of Background layer
4. Start some application and switch to Krita so it overlap started app.
5. video appear in canvas with reduced opacity. See attachment.

I noticed this bug since krita-nightly-x64-v4.2.0-prealpha-308-g7d4289d8b0.zip
but I'm not sure when it was introduced. Current Git 7d4289d.

Tested on two Windows 10 computers with nvidia760 and nvidia1070 - both with generic nvidia drivers.
Comment 1 Halla Rempt 2019-03-01 08:35:53 UTC
It could be that it was introduced when we added support for HDR. Maybe we should just remove the direct opengl mode on windows...
Comment 2 8172635 2019-03-20 12:49:47 UTC
*** Bug 405679 has been marked as a duplicate of this bug. ***
Comment 3 M 2019-03-23 23:07:21 UTC
Created attachment 118988 [details]
Transparency on Linux

It happens for me on Linux (KDE) too - I added a screenshot.
Same behavior when I launch Krita with optirun.

I found that disabling the compositor with Shift+Alt+F12 fixes it.

Version: 4.2.0-pre-alpha (git 27678b4)
 Languages: en_US
 Hidpi: true

Qt

  Version (compiled): 5.12.2
  Version (loaded): 5.12.2

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.0.3-1-MANJARO
  Pretty Productname: Manjaro Linux
  Product Type: manjaro
  Product Version: unknown


Hardware Information

  GPU Acceleration: auto
  Memory: 15951 Mb
  Number of Cores: 8
  Swap Location: /tmp

23 Mar 2019 23:33:14 +0100: Created image "Unnamed", 2048 * 2048 pixels, 100 dpi. Color model: 8-bit integer/channel L*a*b*/Alpha (Lab identity built-in). Layers: 1
23 Mar 2019 23:33:14 +0100: Enabled weighted smoothing.
23 Mar 2019 23:33:14 +0100: Enabled weighted smoothing.
23 Mar 2019 23:33:14 +0100: Enabled weighted smoothing.
23 Mar 2019 23:33:14 +0100: Enabled weighted smoothing.
23 Mar 2019 23:33:14 +0100: Enabled weighted smoothing.
23 Mar 2019 23:33:14 +0100: Enabled weighted smoothing.
23 Mar 2019 23:33:45 +0100: Closing.
OpenGL Info
 
  Vendor:  "NVIDIA Corporation" 
  Renderer:  "GeForce GTX 860M/PCIe/SSE2" 
  Version:  "4.6.0 NVIDIA 418.43" 
  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: false 
  isQtPreferOpenGLES: false 
== log ==
 Supported renderers: QFlags(0x2) 
Surface format preference list: 
* 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) 
    QSurfaceFormat::OpenGL 
* 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) 
    QSurfaceFormat::OpenGLES 
Probing format... QSurfaceFormat::DefaultColorSpace QSurfaceFormat::OpenGL 
Found 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) 
    QSurfaceFormat::OpenGL
Comment 4 M 2019-03-23 23:23:39 UTC
Here is the info for the integrated Intel GPU on the same laptop.
Again, the see-through issue remains.

OpenGL Info
 
  Vendor:  "Intel Open Source Technology Center" 
  Renderer:  "Mesa DRI Intel(R) Haswell Mobile " 
  Version:  "3.0 Mesa 19.0.0" 
  Shading language:  "1.30" 
  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 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::NoProfile) 
     Version: 3.0
     Supports deprecated functions true 
     is OpenGL ES: false 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsOpenGLES: true 
  isQtPreferOpenGLES: false 
== log ==
 Supported renderers: QFlags(0x2|0x4) 
Surface format preference list: 
* 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) 
    QSurfaceFormat::OpenGL 
* 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) 
    QSurfaceFormat::OpenGLES 
Probing format... QSurfaceFormat::DefaultColorSpace QSurfaceFormat::OpenGL 
Found 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) 
    QSurfaceFormat::OpenGL
Comment 5 Dmitry Kazakov 2019-03-25 20:41:15 UTC
I can confirm the bug on Linux...
Comment 6 Dmitry Kazakov 2019-03-26 10:26:35 UTC
Git commit e1d56f30d513b7f08124ba8eea300b76ce4b3e7e by Dmitry Kazakov.
Committed on 26/03/2019 at 10:26.
Pushed by dkazakov into branch 'master'.

Make sure Krita doesn't request alpha-enabled texture buffers

glBlendFunc doesn't support correct alpha blending (alpha channel
value should be calculated separately), so we must ensure that the
calculated alpha value is just dropped entirely.
Related: bug 405540

M  +3    -3    libs/ui/opengl/KisOpenGLModeProber.cpp
M  +4    -0    libs/ui/opengl/kis_opengl_canvas2.cpp

https://commits.kde.org/krita/e1d56f30d513b7f08124ba8eea300b76ce4b3e7e
Comment 7 Dmitry Kazakov 2019-03-26 15:51:10 UTC
Git commit 5699be5ac06b3f25f4616947a3a4faf03956e2d1 by Dmitry Kazakov.
Committed on 26/03/2019 at 15:50.
Pushed by dkazakov into branch 'master'.

Fix semi-transparent bug properly on Windows
Related: bug 405540

M  +3    -3    libs/ui/opengl/KisOpenGLModeProber.cpp
M  +12   -1    libs/ui/opengl/kis_opengl_canvas2.cpp

https://commits.kde.org/krita/5699be5ac06b3f25f4616947a3a4faf03956e2d1
Comment 8 nikola 2019-03-26 20:37:20 UTC
Created attachment 119062 [details]
Direct3D
Comment 9 nikola 2019-03-26 20:40:37 UTC
OpenGL works OK but Direct3D don't. See attachment. Maybe these are related?