[Development] iMX6 EGLGS 2D (QtWidgets) painting acceleration

Uwe Rathmann Uwe.Rathmann at tigertal.de
Tue Sep 4 12:14:43 CEST 2018


On Tue, 04 Sep 2018 12:21:29 +0300, Denis Shienkov wrote:

> Uwe,
> what if I try to back-port my application from Qt5 to Qt4 with X11
> support (on iMX6).

This is what I would try first in a situation like yours. Don't forget to 
set the graphic system to "native" - the default since 4.8 is raster.

> As I understand, then I do not need to specify the OpenGL Widgets with
> Qt4.

Right and you might even see a lower CPU load depending on what happens 
in the various paint engines before calling the native libs.

> Is it will help? Or do I need to use the QtQuick anyway?

When looking at Arnos blog it looks like he has a stable coordinate 
system, where he only updates the curves with each frame ( please correct 
me if I'm wrong ). I would recommend to do this for your application too 
- having different tick labels with each frame will be an issue with all 
backends.

In this situation you would have a positive effect for drawing the 
decoration of the plot canvas ( background/grid/... ) with using the 
scene graph. As the axes are different widgets with Qwt, they would not 
been updated with each frame - so the performance for rendering axes and 
tick labels does not matter here. 

But you could do something similar with QPainter by drawing these parts 
to a QPixmap once and reusing it for each frame. If you are interested - 
contact me at one of the Qwt support channels.

For drawing the curves itself I wouldn't see many benefits from using Qt/
Quick as they do change with each frame. You might even have unwanted 
effects as you might need more memory - anyone who knows better, please 
correct me.

IMHO I would expect, that you could get the optimal performance by doing 
native OpenGL with QOpenGLWidget::paintGL. But drawing a polyline of 400 
points with 10fps should also be no problem on an iMX6 with QPainter/X11.

But also note that Qt/Quick is much more than the scene graph. It is a 
technology, that includes a JavaScript experience and you always have a 
run time environment processing this code: if this matters is something 
only you can decide.

Uwe




More information about the Development mailing list