From 53796aacb220a8ef1e04ab3dcaed9ca4738c1dd2 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 1 Apr 2021 14:23:02 +0300 Subject: [PATCH] platforms/drm: Remove unused parameter in DrmCrtc constructor --- src/plugins/platforms/drm/drm_gpu.cpp | 2 +- src/plugins/platforms/drm/drm_object_crtc.cpp | 5 ++--- src/plugins/platforms/drm/drm_object_crtc.h | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/plugins/platforms/drm/drm_gpu.cpp b/src/plugins/platforms/drm/drm_gpu.cpp index d835f32dd7..bf3eeb89e7 100644 --- a/src/plugins/platforms/drm/drm_gpu.cpp +++ b/src/plugins/platforms/drm/drm_gpu.cpp @@ -171,7 +171,7 @@ bool DrmGpu::updateOutputs() const uint32_t currentCrtc = resources->crtcs[i]; auto it = std::find_if(m_crtcs.constBegin(), m_crtcs.constEnd(), [currentCrtc] (DrmCrtc *c) { return c->id() == currentCrtc; }); if (it == m_crtcs.constEnd()) { - auto c = new DrmCrtc(this, currentCrtc, m_backend, i); + auto c = new DrmCrtc(this, currentCrtc, i); if (!c->init()) { delete c; continue; diff --git a/src/plugins/platforms/drm/drm_object_crtc.cpp b/src/plugins/platforms/drm/drm_object_crtc.cpp index 6f06609800..422f7380c1 100644 --- a/src/plugins/platforms/drm/drm_object_crtc.cpp +++ b/src/plugins/platforms/drm/drm_object_crtc.cpp @@ -17,11 +17,10 @@ namespace KWin { -DrmCrtc::DrmCrtc(DrmGpu *gpu, uint32_t crtcId, DrmBackend *backend, int resIndex) - : DrmObject(gpu, crtc_id) +DrmCrtc::DrmCrtc(DrmGpu *gpu, uint32_t crtcId, int resIndex) + : DrmObject(gpu, crtcId) , m_crtc(drmModeGetCrtc(gpu->fd(), crtcId)) , m_resIndex(resIndex) - , m_backend(backend) { } diff --git a/src/plugins/platforms/drm/drm_object_crtc.h b/src/plugins/platforms/drm/drm_object_crtc.h index 00811d9a5d..b634403e4b 100644 --- a/src/plugins/platforms/drm/drm_object_crtc.h +++ b/src/plugins/platforms/drm/drm_object_crtc.h @@ -25,7 +25,7 @@ class DrmGpu; class DrmCrtc : public DrmObject { public: - DrmCrtc(DrmGpu *gpu, uint32_t crtcId, DrmBackend *backend, int resIndex); + DrmCrtc(DrmGpu *gpu, uint32_t crtcId, int resIndex); bool init() override; @@ -64,7 +64,6 @@ private: QSharedPointer m_currentBuffer; QSharedPointer m_nextBuffer; DrmDumbBuffer *m_blackBuffer = nullptr; - DrmBackend *m_backend; }; }