Patchwork [01/16] qt4-graphics-system: add

login
register
mail settings
Submitter Otavio Salvador
Date Dec. 28, 2011, 7:55 p.m.
Message ID <fde24903e4f56091470e1e7f2fc00a63a8b86f22.1325101673.git.otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/17713/
State New
Headers show

Comments

Otavio Salvador - Dec. 28, 2011, 7:55 p.m.
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 <otavio@ossystems.com.br>
---
 .../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
Saul Wold - Jan. 2, 2012, 6:23 p.m.
On 12/28/2011 11:55 AM, Otavio Salvador wrote:
> 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<otavio@ossystems.com.br>
> ---
>   .../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)}"
> +
We don't have an xserver-common in oe-core, what does it provide?

Is this something that we need to merge over?

Sau!

> +PACKAGE_ARCH = "${MACHINE_ARCH}"
Martin Jansa - Jan. 2, 2012, 6:38 p.m.
On Mon, Jan 02, 2012 at 10:23:09AM -0800, Saul Wold wrote:
> On 12/28/2011 11:55 AM, Otavio Salvador wrote:
> > 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<otavio@ossystems.com.br>
> > ---
> >   .../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)}"
> > +
> We don't have an xserver-common in oe-core, what does it provide?

that's x11-common equivalent in meta-oe, VIRTUAL_RUNTIME should be used
here like in meta/recipes-sato/tasks/task-core-x11.bb

# xserver-common, x11-common
VIRTUAL-RUNTIME_xserver_common ?= "x11-common"

> Is this something that we need to merge over?

xserver-common added functionality (like xinput-calibrator) should be merged 
to x11-common and then xserver-common dropped from meta-oe, but I'm
still busy with other stuff and daywork..

Cheers,
Otavio Salvador - Jan. 4, 2012, 12:49 a.m.
On Mon, Jan 2, 2012 at 16:38, Martin Jansa <martin.jansa@gmail.com> wrote:

> > We don't have an xserver-common in oe-core, what does it provide?
>
> that's x11-common equivalent in meta-oe, VIRTUAL_RUNTIME should be used
> here like in meta/recipes-sato/tasks/task-core-x11.bb
>
> # xserver-common, x11-common
> VIRTUAL-RUNTIME_xserver_common ?= "x11-common"


Done locally; will send an update patchset with this.


> > Is this something that we need to merge over?
>
> xserver-common added functionality (like xinput-calibrator) should be
> merged
> to x11-common and then xserver-common dropped from meta-oe, but I'm
> still busy with other stuff and daywork..
>

It would be awesome if you could look on that soon; this would reduce
another set of delta between OE-Core and Meta-OE.

Patch

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}"