Don't destroy DecorationRenderer in setup/finish compositing
Needs ReviewPublic

Authored by zzag on Mon, Feb 11, 10:36 AM.

Details

Reviewers
None
Group Reviewers
KWin
Summary

Currently, KWin/Wayland crashes when the compositor is reinitialized.
The reason for that is ShellClient's DecorationRenderer gets destroyed
when the scene is already gone, thus there is no current OpenGL context.
Client works around that issue by destroying scene-specific DecorationRender
in finishCompositing. Such a workaround could be applied to ShellClient
as well, but it would make code more confusing because DecoratedClientImpl
also tries to destroy DecorationRenderer.

A better approach would be to notify DecoratedClientImpl that
compositing is about to be finished, so it can destroy the decoration
renderer when the scene is still alive. This not only fixes the
previously mentioned issue in ShellClient, but also makes code a little
bit tidier.

Test Plan

Start Plasma on Wayland session, change any compositor settings (e.g.
animation speed).

Diff Detail

Repository
R108 KWin
Branch
discard-deleted
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 8290
Build 8308: arc lint + arc unit
zzag created this revision.Mon, Feb 11, 10:36 AM
Restricted Application added a project: KWin. · View Herald TranscriptMon, Feb 11, 10:36 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Mon, Feb 11, 10:36 AM
zzag updated this revision to Diff 51401.Mon, Feb 11, 10:39 AM

Make DecoratedClientImpl::destroyRenderer private.

zzag updated this revision to Diff 51674.Thu, Feb 14, 1:13 PM

Emit aboutToToggleCompositing before EffectsHandler is created or destroyed.

zzag updated this revision to Diff 51675.Thu, Feb 14, 1:14 PM

Remove unrelated whitespace change.

zzag updated this revision to Diff 51679.Thu, Feb 14, 2:03 PM

Emit aboutToToggleCompositing before the scene is created.