[scenes/opengl] Cleanup cached decoration shadow textures when suspending compositing
ClosedPublic

Authored by zzag on Dec 2 2018, 12:59 PM.

Details

Summary

When suspending compositing, SceneOpenGLShadow cannot cleanup cached
decoration shadow textures 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

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.Dec 2 2018, 12:59 PM
Restricted Application added a project: KWin. · View Herald TranscriptDec 2 2018, 12:59 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Dec 2 2018, 12:59 PM
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.Dec 2 2018, 1:04 PM
zzag edited the summary of this revision. (Show Details)
graesslin accepted this revision.Dec 2 2018, 3:35 PM
This revision is now accepted and ready to land.Dec 2 2018, 3:35 PM
This revision was automatically updated to reflect the committed changes.