Diffusion KWin 3ad56045805b

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

Authored by zzag on Dec 2 2018, 11:59 AM.

Description

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

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

Reviewers: KWin, graesslin

Reviewed By: KWin, graesslin

Subscribers: kwin

Tags: KWin

Differential Revision: https://phabricator.kde.org/D17306