D18921: Don't destroy DecorationRenderer in setup/finish compositing

Vlad Zagorodniy <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
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
  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).

REPOSITORY
  R108 KWin

BRANCH
  discard-deleted

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

AFFECTED FILES
  composite.cpp
  composite.h
  decorations/decoratedclient.cpp

To: zzag, #kwin
Cc: kwin, jraleigh, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, alexeymin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.