Add O2ES as possible value for KWIN_COMPOSE
If KWIN_COMPOSE is set to O2ES, an OpenGL ES context is tried to be created instead of an OpenGL context. REVIEW: 125919
This commit is contained in:
parent
aa43852301
commit
f2ad98aa3a
5 changed files with 12 additions and 1 deletions
|
@ -176,6 +176,9 @@ void AbstractEglBackend::doneCurrent()
|
|||
|
||||
bool AbstractEglBackend::isOpenGLES() const
|
||||
{
|
||||
if (qstrcmp(qgetenv("KWIN_COMPOSE"), "O2ES") == 0) {
|
||||
return true;
|
||||
}
|
||||
return QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES;
|
||||
}
|
||||
|
||||
|
|
|
@ -85,6 +85,8 @@ bool CompositingPrefs::compositingPossible()
|
|||
#endif
|
||||
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES) {
|
||||
return true;
|
||||
} else if (qstrcmp(qgetenv("KWIN_COMPOSE"), "O2ES") == 0) {
|
||||
return true;
|
||||
}
|
||||
qCDebug(KWIN_CORE) << "No OpenGL or XRender/XFixes support";
|
||||
return false;
|
||||
|
|
|
@ -772,6 +772,9 @@ void Options::setGlPlatformInterface(OpenGLPlatformInterface interface)
|
|||
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES) {
|
||||
qCDebug(KWIN_CORE) << "Forcing EGL native interface as Qt uses OpenGL ES";
|
||||
interface = EglPlatformInterface;
|
||||
} else if (qstrcmp(qgetenv("KWIN_COMPOSE"), "O2ES") == 0) {
|
||||
qCDebug(KWIN_CORE) << "Forcing EGL native interface as OpenGL ES requested through KWIN_COMPOSE environment variable.";
|
||||
interface = EglPlatformInterface;
|
||||
}
|
||||
|
||||
if (m_glPlatformInterface == interface) {
|
||||
|
|
|
@ -28,6 +28,9 @@ namespace QPA
|
|||
|
||||
static bool isOpenGLES()
|
||||
{
|
||||
if (qstrcmp(qgetenv("KWIN_COMPOSE"), "O2ES") == 0) {
|
||||
return true;
|
||||
}
|
||||
return QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES;
|
||||
}
|
||||
|
||||
|
|
|
@ -951,7 +951,7 @@ bool SceneOpenGL2::supported(OpenGLBackend *backend)
|
|||
{
|
||||
const QByteArray forceEnv = qgetenv("KWIN_COMPOSE");
|
||||
if (!forceEnv.isEmpty()) {
|
||||
if (qstrcmp(forceEnv, "O2") == 0) {
|
||||
if (qstrcmp(forceEnv, "O2") == 0 || qstrcmp(forceEnv, "O2ES") == 0) {
|
||||
qCDebug(KWIN_CORE) << "OpenGL 2 compositing enforced by environment variable";
|
||||
return true;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue