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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas
                   |ma/kwin/commit/fda7e150df20 |ma/kwin/commit/1b1aef83b7eb
                   |7d512b60ba4062be5edafc61d53 |f388c1d9ce6b8925eb89347c4a0
                   |9                           |0

--- Comment #32 from Vlad Zahorodnii <vlad.zahorod...@kde.org> ---
Git commit 1b1aef83b7ebf388c1d9ce6b8925eb89347c4a00 by Vlad Zahorodnii.
Committed on 25/10/2021 at 10:29.
Pushed by vladz into branch 'Plasma/5.23'.

kwineffects: Fix destruction of s_fbo with shared GLTexture objects

The WindowThumbnail item uses the GLTexture class. In order to destroy
the thumbnail texture, the item will schedule a destroy job.

This means that the GLTexture can be alive during or after graphics
reset.

On the other hand, as an implementation detail, GLTexture::clear() may
allocate a framebuffer object, which is going to be destroyed together
with the last texture.

Given that window thumbnail textures can be still alive after a graphics
reset and the fact that GLTexturePrivate::s_fbo gets destroyed when the
last texture is destroyed, kwin can end up trying to clear a decoration
texture with now defunct s_fbo.

Since the old old s_fbo is inert, the glBindFramebuffer() function will
fail and the glClear() operation will affect the default framebuffer,
thus leading to black flickering visual artifacts.

In order to fix that issue, this change makes GLTexture destroy s_fbo
unconditionally in GLTexturePrivate::cleanup() which is called whenever
OpenGL stuff is about to tear down, e.g. due to graphics reset, etc.


(cherry picked from commit fda7e150df207d512b60ba4062be5edafc61d539)

M  +4    -7    src/libkwineffects/kwingltexture.cpp
M  +0    -1    src/libkwineffects/kwingltexture_p.h

https://invent.kde.org/plasma/kwin/commit/1b1aef83b7ebf388c1d9ce6b8925eb89347c4a00

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

Reply via email to