Commit f8c00a53 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

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.
parent 2200f4de
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment