Remove Platform::prepareShutdown()
Platform::prepareShutdown() was introduced to work around the issue where the platform accesses destroyed OutputDeviceInterface objects. Since we no longer query OutputDeviceInterface for output info, the Platform::prepareShutdown() function can be dropped.
This commit is contained in:
parent
2200f4ded9
commit
f8c00a530f
5 changed files with 1 additions and 25 deletions
|
@ -129,9 +129,6 @@ ApplicationWayland::~ApplicationWayland()
|
|||
return;
|
||||
}
|
||||
|
||||
if (auto *platform = kwinApp()->platform()) {
|
||||
platform->prepareShutdown();
|
||||
}
|
||||
// need to unload all effects prior to destroying X connection as they might do X calls
|
||||
if (effects) {
|
||||
static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects();
|
||||
|
|
|
@ -91,11 +91,6 @@ XRenderBackend *Platform::createXRenderBackend()
|
|||
}
|
||||
#endif
|
||||
|
||||
void Platform::prepareShutdown()
|
||||
{
|
||||
setOutputsEnabled(false);
|
||||
}
|
||||
|
||||
Edge *Platform::createScreenEdge(ScreenEdges *edges)
|
||||
{
|
||||
return new Edge(edges);
|
||||
|
|
|
@ -80,13 +80,6 @@ public:
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Informs the Platform that it is about to go down and shall do appropriate cleanup.
|
||||
* Child classes can override this function but must call the parent implementation in
|
||||
* the end.
|
||||
*/
|
||||
virtual void prepareShutdown();
|
||||
|
||||
/**
|
||||
* Allows the platform to create a platform specific screen edge.
|
||||
* The default implementation creates a Edge.
|
||||
|
|
|
@ -65,6 +65,7 @@ DrmBackend::DrmBackend(QObject *parent)
|
|||
|
||||
DrmBackend::~DrmBackend()
|
||||
{
|
||||
writeOutputsConfiguration();
|
||||
qDeleteAll(m_gpus);
|
||||
}
|
||||
|
||||
|
@ -73,15 +74,6 @@ Session *DrmBackend::session() const
|
|||
return m_session;
|
||||
}
|
||||
|
||||
void DrmBackend::prepareShutdown()
|
||||
{
|
||||
writeOutputsConfiguration();
|
||||
for (DrmOutput *output : m_outputs) {
|
||||
output->teardown();
|
||||
}
|
||||
Platform::prepareShutdown();
|
||||
}
|
||||
|
||||
Outputs DrmBackend::outputs() const
|
||||
{
|
||||
return m_outputs;
|
||||
|
|
|
@ -43,7 +43,6 @@ public:
|
|||
DmaBufTexture *createDmaBufTexture(const QSize &size) override;
|
||||
Session *session() const override;
|
||||
bool initialize() override;
|
||||
void prepareShutdown() override;
|
||||
|
||||
Outputs outputs() const override;
|
||||
Outputs enabledOutputs() const override;
|
||||
|
|
Loading…
Reference in a new issue