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

Thiago Macieira thiago.macieira at intel.com
Fri Aug 31 00:47:34 CEST 2018


On Thursday, 30 August 2018 08:46:32 PDT Uwe Rathmann wrote:
> On Thu, 30 Aug 2018 07:50:41 -0700, Thiago Macieira wrote:
> > The result of (b) is a retained-mode scene graph. It's in the QtQuick
> > library.
> 
> I know, but now we have Qt 5.11 and it is fair to review this result:
> 
> the API of the scene graph - as it is today - is so far from offering a
> comparable feature set like the one you have with QPainter. Actually it
> does not even offer the most fundamental primitives like:
> 
> - non rectangular boxes

Draw it with OpenGL.

> - text

Implemented in QML. Just layer your text over whatever you were painting as a 
background.

> - ...

Use the onion solution: layers!

> But QPainter is more: it is an API, that allows you to implement render
> engines that works with different backends - f.e PDF is often simply
> mandatory. So implementing a plot package on top of scene graph does not
> mean, that you can drop the QPainter code you have to do the work twice.

PDF is not OpenGL. Trying to solve for both makes it a good solution for 
neither.

> Having the common API running on various backends is such a huge asset of
> Qt - maybe one of the most important ones Qt has to offer. I really don't
> get why so many Qt developers do not realize what you actually have in
> your hands.

I understand it's a huge asset. But it's also a performance bottleneck.

You can always just use QPainter on a QPixmap and paint that pixmap on your 
QSGPaintedItem. It won't be particularly fast, but it will work and do what 
you asked.

If you want faster, redesign with OpenGL in mind.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center






More information about the Development mailing list