From f823be570c7274beeae4eb97aa2fa6869745fbf1 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 28 Apr 2020 20:19:08 +0300 Subject: [PATCH] Make Compositor more verbose Summary: In order to help with debugging why the OpenGL scene is not loaded, it can be really helpful to know what scenes the Compositor attempts to load. Test Plan: Ran kwin with QT_LOGGING_RULES="*.debug=true". Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D29261 --- composite.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/composite.cpp b/composite.cpp index 0243688cd0..243e89e603 100644 --- a/composite.cpp +++ b/composite.cpp @@ -221,7 +221,25 @@ bool Compositor::setupStart() const auto availablePlugins = KPluginLoader::findPlugins(QStringLiteral("org.kde.kwin.scenes")); + for (const KPluginMetaData &pluginMetaData : availablePlugins) { + qCDebug(KWIN_CORE) << "Available scene plugin:" << pluginMetaData.fileName(); + } + for (auto type : qAsConst(supportedCompositors)) { + switch (type) { + case XRenderCompositing: + qCDebug(KWIN_CORE) << "Attempting to load the XRender scene"; + break; + case OpenGLCompositing: + case OpenGL2Compositing: + qCDebug(KWIN_CORE) << "Attempting to load the OpenGL scene"; + break; + case QPainterCompositing: + qCDebug(KWIN_CORE) << "Attempting to load the QPainter scene"; + break; + case NoCompositing: + Q_UNREACHABLE(); + } const auto pluginIt = std::find_if(availablePlugins.begin(), availablePlugins.end(), [type] (const auto &plugin) { const auto &metaData = plugin.rawData();