Discussion:
D17306: [scenes/opengl] Cleanup cached decoration shadows when suspending compositing
Vlad Zagorodniy
2018-12-02 12:59:52 UTC
Permalink
zzag created this revision.
zzag added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
zzag requested review of this revision.

REVISION SUMMARY
When suspending compositing, SceneOpenGLShadow cannot cleanup cached
decoration shadows because the effects handler is already gone.

This sometimes can result in a crash when running kwin_x11 --replace
(we're hitting an assert statement).

To fix that, let's use the scene instead of the effects handler for
making the OpenGL context current.

TEST PLAN
No longer hit the assert statement:

ASSERT: "m_cache.isEmpty()" in file /home/vlad/Workspace/KDE/src/kde/workspace/kwin/plugins/scenes/opengl/scene_opengl.cpp, line 2025
Application::crashHandler() called with signal 6; recent crashes: 1
QCoreApplication::applicationFilePath: Please instantiate the QApplication object first
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = kwin_x11 path = /home/vlad/Workspace/KDE/usr/bin pid = 5407
KCrash: Arguments: /home/vlad/Workspace/KDE/usr/bin/kwin_x11 --replace

REPOSITORY
R108 KWin

BRANCH
gracefully-cleanup-decoration-shadow-cache

REVISION DETAIL
https://phabricator.kde.org/D17306

AFFECTED FILES
plugins/scenes/opengl/scene_opengl.cpp

To: zzag, #kwin
Cc: kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
Vlad Zagorodniy
2018-12-02 13:04:21 UTC
Permalink
zzag retitled this revision from "[scenes/opengl] Cleanup cached decoration shadows when suspending compositing" to "[scenes/opengl] Cleanup cached decoration shadow textures when suspending compositing".
zzag edited the summary of this revision.

REPOSITORY
R108 KWin

REVISION DETAIL
https://phabricator.kde.org/D17306

To: zzag, #kwin
Cc: kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
Vlad Zagorodniy
2018-12-02 15:26:12 UTC
Permalink
zzag added a dependent revision: D17311: Make sure that effect windows outlive effects.

REPOSITORY
R108 KWin

REVISION DETAIL
https://phabricator.kde.org/D17306

To: zzag, #kwin
Cc: kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
Martin Flöser
2018-12-02 15:35:23 UTC
Permalink
graesslin accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
R108 KWin

BRANCH
gracefully-cleanup-decoration-shadow-cache

REVISION DETAIL
https://phabricator.kde.org/D17306

To: zzag, #kwin, graesslin
Cc: kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
Vlad Zagorodniy
2018-12-02 17:59:14 UTC
Permalink
This revision was automatically updated to reflect the committed changes.
Closed by commit R108:3ad56045805b: [scenes/opengl] Cleanup cached decoration shadow textures when suspending
 (authored by zzag).

REPOSITORY
R108 KWin

CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D17306?vs=46699&id=46728

REVISION DETAIL
https://phabricator.kde.org/D17306

AFFECTED FILES
plugins/scenes/opengl/scene_opengl.cpp

To: zzag, #kwin, graesslin
Cc: kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
Loading...