[platforms/drm] Early platform and outputs teardown
ClosedPublic

Authored by romangg on Aug 31 2019, 10:51 AM.

Details

Summary

Since we now use in the backends the OutputDeviceInterface for output data
all access must be complete before the Wayland server goes down. For that
introduce a new function to prepare shutdown in the backends.

While at it also remove the output deletion, since they get deleted through
Qt's object system leading to crashes on double free.

Test Plan

Shutdown works without seg faults in the Drm backend.

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.
romangg created this revision.Aug 31 2019, 10:51 AM
Restricted Application added a project: KWin. · View Herald TranscriptAug 31 2019, 10:51 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Aug 31 2019, 10:51 AM
zzag accepted this revision.Sep 2 2019, 1:38 PM
zzag added a subscriber: zzag.

Remove all usages of auto in this patch(if (auto *platform = kwinApp()->platform()) { and for (auto *output : m_outputs) {). Instead of erasing redundant information, you erase valuable information (types).

platform.h
89–90

Remove one empty line.

This revision is now accepted and ready to land.Sep 2 2019, 1:38 PM
This revision was automatically updated to reflect the committed changes.
romangg marked an inline comment as done.