Export supported openGLPlatformInterfaces to the DBus interface
Allows the KCM to know which platforms are supported (e.g. glx and egl or just egl).
This commit is contained in:
parent
be33c59c16
commit
8005aa8b5a
3 changed files with 28 additions and 0 deletions
|
@ -862,6 +862,22 @@ QString Compositor::compositingType() const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QStringList Compositor::supportedOpenGLPlatformInterfaces() const
|
||||||
|
{
|
||||||
|
QStringList interfaces;
|
||||||
|
bool supportsGlx = (kwinApp()->operationMode() == Application::OperationModeX11);
|
||||||
|
#ifdef KWIN_HAVE_OPENGLES
|
||||||
|
supportsGlx = false;
|
||||||
|
#endif
|
||||||
|
if (supportsGlx) {
|
||||||
|
interfaces << QStringLiteral("glx");
|
||||||
|
}
|
||||||
|
#ifdef KWIN_HAVE_EGL
|
||||||
|
interfaces << QStringLiteral("egl");
|
||||||
|
#endif
|
||||||
|
return interfaces;
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************
|
/*****************************************************
|
||||||
* Workspace
|
* Workspace
|
||||||
****************************************************/
|
****************************************************/
|
||||||
|
|
11
composite.h
11
composite.h
|
@ -79,6 +79,16 @@ class Compositor : public QObject {
|
||||||
* @li @c gles OpenGL ES 2
|
* @li @c gles OpenGL ES 2
|
||||||
**/
|
**/
|
||||||
Q_PROPERTY(QString compositingType READ compositingType)
|
Q_PROPERTY(QString compositingType READ compositingType)
|
||||||
|
/**
|
||||||
|
* @brief All currently supported OpenGLPlatformInterfaces.
|
||||||
|
*
|
||||||
|
* Possible values:
|
||||||
|
* @li glx
|
||||||
|
* @li egl
|
||||||
|
*
|
||||||
|
* Values depend on operation mode and compile time options.
|
||||||
|
**/
|
||||||
|
Q_PROPERTY(QStringList supportedOpenGLPlatformInterfaces READ supportedOpenGLPlatformInterfaces)
|
||||||
public:
|
public:
|
||||||
enum SuspendReason { NoReasonSuspend = 0, UserSuspend = 1<<0, BlockRuleSuspend = 1<<1, ScriptSuspend = 1<<2, AllReasonSuspend = 0xff };
|
enum SuspendReason { NoReasonSuspend = 0, UserSuspend = 1<<0, BlockRuleSuspend = 1<<1, ScriptSuspend = 1<<2, AllReasonSuspend = 0xff };
|
||||||
Q_DECLARE_FLAGS(SuspendReasons, SuspendReason)
|
Q_DECLARE_FLAGS(SuspendReasons, SuspendReason)
|
||||||
|
@ -158,6 +168,7 @@ public:
|
||||||
QString compositingNotPossibleReason() const;
|
QString compositingNotPossibleReason() const;
|
||||||
bool isOpenGLBroken() const;
|
bool isOpenGLBroken() const;
|
||||||
QString compositingType() const;
|
QString compositingType() const;
|
||||||
|
QStringList supportedOpenGLPlatformInterfaces() const;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void addRepaintFull();
|
void addRepaintFull();
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<property name="compositingNotPossibleReason" type="s" access="read"/>
|
<property name="compositingNotPossibleReason" type="s" access="read"/>
|
||||||
<property name="openGLIsBroken" type="b" access="read"/>
|
<property name="openGLIsBroken" type="b" access="read"/>
|
||||||
<property name="compositingType" type="s" access="read"/>
|
<property name="compositingType" type="s" access="read"/>
|
||||||
|
<property name="supportedOpenGLPlatformInterfaces" type="as" access="read"/>
|
||||||
<signal name="compositingToggled">
|
<signal name="compositingToggled">
|
||||||
<arg name="active" type="b" direction="out"/>
|
<arg name="active" type="b" direction="out"/>
|
||||||
</signal>
|
</signal>
|
||||||
|
|
Loading…
Reference in a new issue