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

backends/drm: Remove Compositor dependency

This breaks cyclic dependency between Compositor and DRM backend, there
are still indirect dependencies though. However, fewer cyclic
dependencies should make the architecture more cleaner and easier to
tweak.
parent 51326dfb
Pipeline #209781 failed with stage
in 11 minutes and 26 seconds
......@@ -11,8 +11,6 @@
#include <config-kwin.h>
#include "backends/libinput/libinputbackend.h"
#include "composite.h"
#include "cursor.h"
#include "drm_egl_backend.h"
#include "drm_fourcc.h"
#include "drm_gpu.h"
......@@ -29,7 +27,6 @@
#include "main.h"
#include "outputconfiguration.h"
#include "renderloop.h"
#include "scene.h"
#include "session.h"
#include "utils/udev.h"
// KF5
......@@ -162,10 +159,7 @@ void DrmBackend::reactivate()
for (const auto &output : qAsConst(m_outputs)) {
output->renderLoop()->uninhibit();
}
if (Compositor::compositing()) {
Compositor::self()->scene()->addRepaintFull();
output->renderLoop()->scheduleRepaint();
}
// While the session had been inactive, an output could have been added or
......@@ -734,9 +728,6 @@ bool DrmBackend::applyOutputChanges(const OutputConfiguration &config)
output->applyChanges(config);
}
}
if (Compositor::compositing()) {
Compositor::self()->scene()->addRepaintFull();
}
return true;
}
......
......@@ -10,7 +10,6 @@
#include "basiceglsurfacetexture_internal.h"
#include "basiceglsurfacetexture_wayland.h"
// kwin
#include "composite.h"
#include "drm_abstract_output.h"
#include "drm_backend.h"
#include "drm_buffer_gbm.h"
......
......@@ -14,7 +14,6 @@
#include "drm_object_crtc.h"
#include "drm_pipeline.h"
#include "composite.h"
#include "cursor.h"
#include "drm_dumb_buffer.h"
#include "drm_dumb_swapchain.h"
......@@ -25,7 +24,6 @@
#include "outputconfiguration.h"
#include "renderloop.h"
#include "renderloop_p.h"
#include "scene.h"
#include "session.h"
#include "wayland/drmleasedevice_v1_interface.h"
// Qt
......@@ -277,11 +275,9 @@ bool DrmOutput::setDrmDpmsMode(DpmsMode mode)
m_pipeline->applyPendingChanges();
setDpmsModeInternal(mode);
if (active) {
m_renderLoop->uninhibit();
m_gpu->platform()->checkOutputsAreOn();
if (Compositor::compositing()) {
Compositor::self()->scene()->addRepaintFull();
}
m_renderLoop->uninhibit();
m_renderLoop->scheduleRepaint();
} else {
m_renderLoop->inhibit();
m_gpu->platform()->createDpmsFilter();
......
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