From patchwork Wed Dec 28 19:55:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [01/16] qt4-graphics-system: add Date: Wed, 28 Dec 2011 19:55:22 -0000 From: Otavio Salvador X-Patchwork-Id: 17713 Message-Id: To: openembedded-core@lists.openembedded.org Allow setting default runtime graphics system engine for Qt4 applications per machine. Depending on the GPU and Xorg driver, this can boost and impact significantly the drawing performance. The default setting is to 'raster' as this offer best performance for most machines GPUs. Signed-off-by: Otavio Salvador --- .../qt4-graphics-system/qt4-graphics-system_1.0.bb | 24 ++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-qt/qt4-graphics-system/qt4-graphics-system_1.0.bb diff --git a/meta/recipes-qt/qt4-graphics-system/qt4-graphics-system_1.0.bb b/meta/recipes-qt/qt4-graphics-system/qt4-graphics-system_1.0.bb new file mode 100644 index 0000000..e3a3a1d --- /dev/null +++ b/meta/recipes-qt/qt4-graphics-system/qt4-graphics-system_1.0.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "Set default Qt4 Graphics System to ${QT_GRAPHICS_SYSTEM}" +SECTION = "x11/base" +LICENSE = "MIT-X" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +QT_GRAPHICS_SYSTEM ?= "raster" + +def _get_extra_rdepends(d): + gs = d.getVar('QT_GRAPHICS_SYSTEM', 1) + if gs == "opengl": + return "qt4-plugin-graphicssystems-glgraphicssystem" + + return "" + +do_install () { + install -d ${D}/${sysconfdir}/X11/Xsession.d/ + cfg_file=${D}/${sysconfdir}/X11/Xsession.d/85xqt-graphicssystem + echo "export QT_GRAPHICSSYSTEM=${QT_GRAPHICS_SYSTEM}" > $cfg_file + chmod +x $cfg_file +} + +RDEPENDS_${PN} = "xserver-common ${@_get_extra_rdepends(d)}" + +PACKAGE_ARCH = "${MACHINE_ARCH}"