[Development] About inheriting QBlitterPaintEngine from QGL2PaintEngineEx class

haithem rahmani haithem.rahmani at gmail.com
Mon Jul 14 11:58:11 CEST 2014


On Sun, Jul 13, 2014 at 7:41 PM, Lind Jorgen <Jorgen.Lind at digia.com> wrote:

>  Hi
> On 10 Jul 2014, at 11:48, haithem rahmani <haithem.rahmani at gmail.com>
> wrote:
>   Hi,
>  When running Qt-5 on top of the directfb qpa plugin,  some benchmarks
> are quite slow.
> (http://smashcat.org/av/canvas_test)
>   I've found that the 2D painting ops are going through the
> QBlitterPaintEngine class
> that is inheriting the QRasterPaintEngine class, which is doing all the
> painting via CPU.
>  Qt provides another paintEgine class, QGL2PaintEngineEx, that is doing
> the same paintings via the GPU.
>  So I want to know whether is possible to make the QBlitterPaintEngine
> inherit this QGL2PaintEngineEx
> instead of QRasterPaintEngine and got things working correctly or not?
>  PS: the eglfs qpa plugin is going through the QRasterPaintEngine class
> too.
>    Its been a while since I have looked at the DirectFB apis, so I might
> be wrong, but it used to not be very clear how to interoperate DirectFB and
> OpenGL.

In my case the inter-operability is guaranteed by the fact the opengl libs
I'm using  come  with
a directfb/egl backend, i.e DirectFB surfaces are used as buffers where the
GPU can daw.

>  When that is said, it will be a lot of work to base QBlitterPaintEngine
> on top of QOpenGL2PaintEngineEx, to give something that gives acceptable
> performance.

if it is feasible, I can have a look on it, but my big issue is that the
QGL2PaintEngineEx is part of the QtOpenGL Module while the
QBlitterPaintEngine is in the QtGui.
And I can't find/see any clean way to isolate the QGL2PaintEngineEx
declatartion/implementation and move it under QtGUI module.
Could you give me some hints?


> Jørgen

*Never say that's "impossible", the word itself says "I'm Possible"*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140714/1ef4565a/attachment.html>

More information about the Development mailing list