Graphics Performance
We’re using Qt Embedded (QWS) 4.7.3 with OpenGL ES on a TI processor with integrated SGX accelerator. It seems needed options (such as powervr, opengl es2, neon, openvg, etc.) are being configured and installed properly and we are able to run Open GL apps fine.
However, it seems the GUI itself is unreasonably slow, assuming that Qt is actually leveraging any of the above mentioned support modules. I will give two examples:
1 – Animating the opening of an on-screen keyboard is extremely chop (you get maybe 3 frames per second)
2 – Alpha blending is very sluggish
So, I’m guessing when neon, openvg, opengl, etc. are enabled Qt is still doing everything it normally does? Do you have to explicitly setup your application to make use of each of these options?
5 replies
Hi there, I am not sure about embedded platform, however what I know is that to make Qt 4.7.3 work with opengl or openvg graphicssystems you must set it into the Qt build, during the configure procedure (then make, make install).
Otherwise it will be raster. You can set it by doing:
configure “other config stuff bla bla” -graphicssystem opengl
or
configure “other config stuff bla bla” -graphicssystem openvg
This means you have to rebuild Qt. Also, as the configure —help shows, these features are experimental… from what I know, it does not work well on some desktop platforms yet, not sure about yours… unfortunately.
Regards,
When I tried to add the -graphicssystem switch I get the following:
- Error: Graphics System plugins are not supported on QWS.
- On QWS, the graphics system API is part of the QScreen plugin architecture
- rather than existing as a separate plugin.
This points to what I was previously assuming: using the powervr plugin uses the opengl system for “painting.”
FYI, here is my configure command:
- ./configure
- -prefix [path/to/target]/qt-embedded -embedded arm
- -platform qws/linux-x86-g++ -xplatform qws/linux-TIarmv7-g++
- -depths 16,24,32 -no-mmx -no-3dnow -no-sse -no-sse2
- -no-glib -no-cups -no-largefile -no-accessibility -no-openssl
- -no-gtkstyle -qt-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput
- -qt-mouse-tslib -plugin-mouse-linuxtp -plugin-mouse-pc -fast
- -opengl es2 -openvg -qt-gfx-transformed -qt-gfx-vnc
- -qt-gfx-linuxfb -qt-gfx-multiscreen -plugin-gfx-powervr
- -D QT_NO_QWS_CURSOR -D QT_QWS_CLIENTBLIT
- -nomake examples -nomake demos -nomake docs -nomake translations
And here is the relevant resulting output from configure:
- Debug .................. no
- QtDBus module .......... no
- QtConcurrent code ...... yes
- QtGui module ........... yes
- QtScript module ........ yes
- QtScriptTools module ... yes
- QtXmlPatterns module ... no
- Phonon module .......... no
- Multimedia module ...... auto
- SVG module ............. yes
- WebKit module .......... yes
- JavaScriptCore JIT ..... To be decided by JavaScriptCore
- Declarative module ..... yes
- Declarative debugging ...yes
- Support for S60 ........ no
- Symbian DEF files ...... no
- STL support ............ yes
- PCH support ............ yes
- MMX/3DNOW/SSE/SSE2/SSE3. no/no/no/no/no
- SSSE3/SSE4.1/SSE4.2..... no/no/no
- AVX..................... no
- iWMMXt support ......... no
- NEON support ........... yes
- IPv6 support ........... yes
- IPv6 ifname support .... yes
- getaddrinfo support .... yes
- getifaddrs support ..... yes
- Accessibility .......... no
- NIS support ............ yes
- CUPS support ........... no
- Iconv support .......... no
- Glib support ........... no
- GStreamer support ...... no
- PulseAudio support ..... no
- Large File support ..... no
- GIF support ............ plugin
- zlib support ........... yes
- Session management ..... no
- Embedded support ....... arm
- Freetype2 support ...... auto (yes)
- Graphics (plugin) ...... powervr
- Decorations (plugin) ...
- Keyboard driver (plugin) ..
- Mouse driver (plugin) .. linuxtp pc
- OpenGL support ......... yes (OpenGL ES 2.x)
- EGL support ............ yes <EGL/egl.h>
- OpenVG support ......... yes
- OpenSSL support ........ no
- Alsa support ........... no
- ICD support ............ no
I also define this on the target system:
- export QWS_DISPLAY="powervr"
I suppose I could ask my question in a different way: What is meant when the Qt docs say that a widget is “painted” with OpenGL? Is it painted internally as a bitmap/pixel buffer and then just copied to an OpenGL context?
samus8zero2x wrote:
Error: Graphics System plugins are not supported on QWS. On QWS, the graphics system API is part of the QScreen plugin architecture rather than existing as a separate plugin.
Hey man, that’s just bad news…
Regarding your question, to me it seems that Qt paints the window using a raster process by default. I could not find the OpenGL being the base widget painting in the documentation, but if it is there, I believe its wrong and has to be corrected. Qt support for OpenGL means that you can subclass QGLWidget (framebuffer, shaders, and all the benefits), but for that class only and not the window painting system as a whole. I am not a SVG user also, but I’ve googled it and saw that you can use a QGraphicsSvgItem to display Scalable Vector Graphics drawings as items in the scene.
For the OpenGL QGLWidget subclass, there is no raster procedure involved. Again not sure about SVG, but it also sounds false.
I hope this helps,
VitorAMJ
OK, the point is that I’m trying to animate core Qt widgets. Anything I can do manually in GL is kind of on the side.
Let’s say I have a scenario like this:
MainWindow
—VerticalLayout
——QScrollArea
———Screen Content
——MyKeyboardWidget
———QPushButtons
I then animate the opening of the keyboard by changing the keyboard’s height property using a QTimeLine event. Because of the vertical layout, this causes the scroll area height to be reduced as more of the keyboard is displayed. But in this case I have poor graphics update performance.
If I have an alpha blended overlay or watermark over the whole MainWindow, I get significantly worse performance. I’ve also tried the similar in a QGraphicsView with and without inheriting QGLWidget with similar results.
Can you guys think of a way to speed this up? Perhaps I need to try some trickery with off-screen drawing?
Hey samus8zero2x,
EDIT: I am sorry if I made you think that, my bad, but QGLWIdget is only for GL content, it does not help to subclass the widgets you are trying to use.
I am probably not the best code optimizer, but I know some sources to recommend to you:
I found this link [slideshare.net] about some Qt optimizations.
There is also some videos [developer.qt.nokia.com] in the elearning main qtdev page.
I saw somethings that might handy:”
Optimizing Performance in Qt-Based Applications [developer.qt.nokia.com]
Performance: Do Graphics the Right Way [developer.qt.nokia.com]
Qt Tips and Tricks [developer.qt.nokia.com]
Accelerating Performance of Qt on TI’s Embedded Processors [developer.qt.nokia.com]
Please let me know if you find something useful.
Very best regards,
VitorAMJ
You must log in to post a reply. Not a member yet? Register here!
