https://bugs.kde.org/show_bug.cgi?id=455526

Vlad Zahorodnii <vlad.zahorod...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/plas
                   |                            |ma/kwin/-/commit/36960d8572
                   |                            |221c696289232d0ab55c02ecfa5
                   |                            |324

--- Comment #42 from Vlad Zahorodnii <vlad.zahorod...@kde.org> ---
Git commit 36960d8572221c696289232d0ab55c02ecfa5324 by Vlad Zahorodnii.
Committed on 18/08/2023 at 15:08.
Pushed by vladz into branch 'master'.

plugins/blur: Rewrite it

Given how the blur effect works, if a pixel changes, the surrounding
pixels may have to be repainted as well. Currently, it's achieved by
expanding the damage in the BlurEffect::prePaintWindow() function.
However, it means that the blur effect should see both surface and
buffer damage in the pre paint pass.

Unfortunately, after refactoring surface and buffer damage tracking,
kwin no longer provides the buffer damage in the pre paint pass (it does
so for good reasons). This broke the blur effect. As an example, you may
see visual glitches when moving the software cursor over blurred areas
of a window.

In order to fix this issue, the blur effect has to cache background
behind every window to avoid blurring already blurred areas.

This change implements a background cache. Unfortunately, since the
blur effect's code has become very difficult to change over the years,
this change rewrites the relevant parts of the blur effect.

With the proposed design, the blur effect is going to maintain cached
background for every window + offscreen render targets. It may have
issues with animated windows, however in practice, it seems to behave
good enough. However, if it becomes pressing matter, we can move from
simplistic design in this patch to somewhat more sophisticated design
that involves textures with rounded up size.

M  +0    -6    src/libkwineffects/kwinglutils.cpp
M  +0    -7    src/libkwineffects/kwinglutils.h
M  +0    -1    src/plugins/blur/CMakeLists.txt
M  +370  -452  src/plugins/blur/blur.cpp
M  +46   -38   src/plugins/blur/blur.h
M  +0    -2    src/plugins/blur/blur.qrc
D  +0    -310  src/plugins/blur/blurshader.cpp
D  +0    -100  src/plugins/blur/blurshader.h
D  +0    -9    src/plugins/blur/shaders/copy.frag
D  +0    -13   src/plugins/blur/shaders/copy_core.frag
M  +2    -3    src/plugins/blur/shaders/downsample.frag
M  +2    -3    src/plugins/blur/shaders/downsample_core.frag
M  +2    -4    src/plugins/blur/shaders/noise.frag
M  +2    -4    src/plugins/blur/shaders/noise_core.frag
M  +2    -3    src/plugins/blur/shaders/upsample.frag
M  +2    -3    src/plugins/blur/shaders/upsample_core.frag
M  +7    -2    src/plugins/blur/shaders/vertex.vert
M  +7    -2    src/plugins/blur/shaders/vertex_core.vert

https://invent.kde.org/plasma/kwin/-/commit/36960d8572221c696289232d0ab55c02ecfa5324

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to