Debug output for platforms

Summary: Mostly so DRM can report if it has AMS or not

Test Plan:
Ran on my DRM setup, printed debug.
Spawned nested compositor, printed debug on that

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8702
icc-effect-5.14.5
David Edmundson 2017-11-07 19:12:51 +00:00
parent b806915d5d
commit 92e5db1ffe
5 changed files with 33 additions and 0 deletions

View File

@ -477,4 +477,9 @@ void Platform::createEffectsHandler(Compositor *compositor, Scene *scene)
new EffectsHandlerImpl(compositor, scene);
}
QString Platform::supportInformation() const
{
return QStringLiteral("Name: %1\n").arg(metaObject()->className());
}
}

View File

@ -383,6 +383,15 @@ public:
**/
virtual QVector<CompositingType> supportedCompositors() const = 0;
/*
* A string of information to include in kwin debug output
* It should not be translated.
*
* The base implementation prints the name.
* @since 5.12
*/
virtual QString supportInformation() const;
public Q_SLOTS:
void pointerMotion(const QPointF &position, quint32 time);
void pointerButtonPressed(quint32 button, quint32 time);

View File

@ -727,4 +727,15 @@ QVector<CompositingType> DrmBackend::supportedCompositors() const
#endif
}
QString DrmBackend::supportInformation() const
{
QString supportInfo;
QDebug s(&supportInfo);
s.nospace();
s << "Name: " << "DRM" << endl;
s << "Active: " << m_active << endl;
s << "Atomic Mode Setting: " << m_atomicModeSetting << endl;
return supportInfo;
}
}

View File

@ -120,6 +120,8 @@ public:
QVector<CompositingType> supportedCompositors() const override;
QString supportInformation() const override;
public Q_SLOTS:
void turnOutputsOn();

View File

@ -46,6 +46,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "rules.h"
#include "screenedge.h"
#include "screens.h"
#include "platform.h"
#include "scripting/scripting.h"
#ifdef KWIN_BUILD_TABBOX
#include "tabbox.h"
@ -1425,6 +1426,11 @@ QString Workspace::supportInformation() const
support.append(bridge->supportInformation());
support.append(QStringLiteral("\n"));
}
support.append(QStringLiteral("Platform\n"));
support.append(QStringLiteral("==========\n"));
support.append(kwinApp()->platform()->supportInformation());
support.append(QStringLiteral("\n"));
support.append(QStringLiteral("Options\n"));
support.append(QStringLiteral("=======\n"));
const QMetaObject *metaOptions = options->metaObject();