From a2c765800bd16d0bf7c71cca20d2af288e1b6101 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 15 Dec 2020 22:32:14 +0200 Subject: [PATCH] Drop Screens::supportsTransformations It's used nowhere. --- plugins/platforms/drm/drm_output.cpp | 11 ----------- plugins/platforms/drm/drm_output.h | 2 -- plugins/platforms/drm/screens_drm.cpp | 11 ----------- plugins/platforms/drm/screens_drm.h | 4 ---- screens.cpp | 6 ------ screens.h | 6 ------ 6 files changed, 40 deletions(-) diff --git a/plugins/platforms/drm/drm_output.cpp b/plugins/platforms/drm/drm_output.cpp index bebbc40cb9..728bcd7181 100644 --- a/plugins/platforms/drm/drm_output.cpp +++ b/plugins/platforms/drm/drm_output.cpp @@ -1049,17 +1049,6 @@ bool DrmOutput::atomicReqModesetPopulate(drmModeAtomicReq *req, bool enable) return ret; } -bool DrmOutput::supportsTransformations() const -{ - if (!m_primaryPlane) { - return false; - } - const auto transformations = m_primaryPlane->supportedTransformations(); - return transformations.testFlag(DrmPlane::Transformation::Rotate90) - || transformations.testFlag(DrmPlane::Transformation::Rotate180) - || transformations.testFlag(DrmPlane::Transformation::Rotate270); -} - int DrmOutput::gammaRampSize() const { return m_crtc->gammaRampSize(); diff --git a/plugins/platforms/drm/drm_output.h b/plugins/platforms/drm/drm_output.h index 467085991c..936c2c0fda 100644 --- a/plugins/platforms/drm/drm_output.h +++ b/plugins/platforms/drm/drm_output.h @@ -83,8 +83,6 @@ public: bool initCursor(const QSize &cursorSize); - bool supportsTransformations() const; - /** * Drm planes might be capable of realizing the current output transform without usage * of compositing. This is a getter to query the current state of that diff --git a/plugins/platforms/drm/screens_drm.cpp b/plugins/platforms/drm/screens_drm.cpp index 8345444e9d..ded84b06a4 100644 --- a/plugins/platforms/drm/screens_drm.cpp +++ b/plugins/platforms/drm/screens_drm.cpp @@ -8,14 +8,12 @@ */ #include "screens_drm.h" #include "drm_backend.h" -#include "drm_output.h" namespace KWin { DrmScreens::DrmScreens(DrmBackend *backend, QObject *parent) : OutputScreens(backend, parent) - , m_backend(backend) { connect(backend, &DrmBackend::screensQueried, this, &DrmScreens::updateCount); connect(backend, &DrmBackend::screensQueried, this, &DrmScreens::changed); @@ -23,13 +21,4 @@ DrmScreens::DrmScreens(DrmBackend *backend, QObject *parent) DrmScreens::~DrmScreens() = default; -bool DrmScreens::supportsTransformations(int screen) const -{ - const auto enOuts = m_backend->drmEnabledOutputs(); - if (screen >= enOuts.size()) { - return false; - } - return enOuts.at(screen)->supportsTransformations(); -} - } diff --git a/plugins/platforms/drm/screens_drm.h b/plugins/platforms/drm/screens_drm.h index 1f08f1fe7d..860ac1336b 100644 --- a/plugins/platforms/drm/screens_drm.h +++ b/plugins/platforms/drm/screens_drm.h @@ -20,10 +20,6 @@ class DrmScreens : public OutputScreens public: DrmScreens(DrmBackend *backend, QObject *parent = nullptr); ~DrmScreens() override; - - bool supportsTransformations(int screen) const override; - - DrmBackend *m_backend; }; } diff --git a/screens.cpp b/screens.cpp index 81954f49f9..f14a3720f9 100644 --- a/screens.cpp +++ b/screens.cpp @@ -201,12 +201,6 @@ bool Screens::isInternal(int screen) const return false; } -bool Screens::supportsTransformations(int screen) const -{ - Q_UNUSED(screen) - return false; -} - Qt::ScreenOrientation Screens::orientation(int screen) const { Q_UNUSED(screen) diff --git a/screens.h b/screens.h index 92e17dc54a..a4b8e03945 100644 --- a/screens.h +++ b/screens.h @@ -127,12 +127,6 @@ public: */ virtual bool isInternal(int screen) const; - /** - * @returns @c true if the @p screen can be rotated. - * Default implementation returns @c false - */ - virtual bool supportsTransformations(int screen) const; - virtual Qt::ScreenOrientation orientation(int screen) const; int physicalDpiX(int screen) const;