From f067aa05c030fd02d46f10ab2023059978b4f816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Mon, 11 Apr 2011 10:41:40 +0200 Subject: Make the xcomposite the default gl integration backend The others can be opted in with the environment variable: QT_WAYLAND_GL_CONFIG --- .../wayland/gl_integration/gl_integration.pri | 30 ++++++++++++++++++++++ src/plugins/platforms/wayland/wayland.pro | 17 +----------- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/src/plugins/platforms/wayland/gl_integration/gl_integration.pri b/src/plugins/platforms/wayland/gl_integration/gl_integration.pri index 835f880..d9b5fa9 100644 --- a/src/plugins/platforms/wayland/gl_integration/gl_integration.pri +++ b/src/plugins/platforms/wayland/gl_integration/gl_integration.pri @@ -1,3 +1,7 @@ +contains(QT_CONFIG, opengl) { + DEFINES += QT_WAYLAND_GL_SUPPORT + QT += opengl + HEADERS += \ $$PWD/qwaylandglintegration.h \ $$PWD/qwaylandglwindowsurface.h @@ -6,6 +10,32 @@ SOURCES += \ $$PWD/qwaylandglintegration.cpp \ $$PWD/qwaylandglwindowsurface.cpp + QT_WAYLAND_GL_CONFIG = $$(QT_WAYLAND_GL_CONFIG) + contains(QT_CONFIG, opengles2) { + isEqual(QT_WAYLAND_GL_CONFIG, wayland_egl) { + QT_WAYLAND_GL_INTEGRATION = $$QT_WAYLAND_GL_CONFIG + CONFIG += wayland_egl + } else:isEqual(QT_WAYLAND_GL_CONFIG,readback) { + QT_WAYLAND_GL_INTEGRATION = readback_egl + CONFIG += readback_egl + } else { + QT_WAYLAND_GL_INTEGRATION = xcomposite_egl + CONFIG += xcomposite_egl + } + } else { + isEqual(QT_WAYLAND_GL_CONFIG, readback) { + QT_WAYLAND_GL_INTEGRATION = readback_glx + CONFIG += readback_glx + } else { + QT_WAYLAND_GL_INTEGRATION = xcomposite_glx + CONFIG += xcomposite_glx + } + } + + message("Wayland GL Integration: $$QT_WAYLAND_GL_INTEGRATION") +} + + wayland_egl { include ($$PWD/wayland_egl/wayland_egl.pri) } diff --git a/src/plugins/platforms/wayland/wayland.pro b/src/plugins/platforms/wayland/wayland.pro index ae17a14..5945438 100644 --- a/src/plugins/platforms/wayland/wayland.pro +++ b/src/plugins/platforms/wayland/wayland.pro @@ -31,22 +31,7 @@ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_WAYLAND INCLUDEPATH += $$PWD -contains(QT_CONFIG, opengl) { - DEFINES += QT_WAYLAND_GL_SUPPORT - QT += opengl - - contains(QT_CONFIG, opengles2) { - CONFIG += wayland_egl - #CONFIG += readback_egl - #CONFIG += xcomposite_egl - } else { - CONFIG += readback_glx - #CONFIG += xcomposite_gl - - } - - include ($$PWD/gl_integration/gl_integration.pri) -} +include ($$PWD/gl_integration/gl_integration.pri) include (../fontdatabases/genericunix/genericunix.pri) -- cgit v0.12