This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Qt QML Scene Graph trouble with EGLFS

Other Parts Discussed in Thread: AM3517

Hello all!
I develop a medical application for embeded system (with eglfs, AM3517 processor based). I need to create a QML scene containing raw OpenGL Item (for displaying real-time graph).
I found this example in Qt documentation: http://qt-project.org/doc/qt-5.1/qtquick/scenegraph-textureinsgnode.html
, and modify it for my application (Change TextureNode class for render some VBO into FBO ).
I also have many other QML files that contain various elements of the interface.

So.. then i run application with only openGL Item, i have 10% CPU usage:
main.qml

  1. import QtQuick 2.0
  2. import Graphics 1.0
  3. Rectangle {
  4.     width: 800
  5.     height: 600
  6.     color: "Gray"
  7.     GraphItem{
  8.         x: 230; y: 180
  9.         width: 210
  10.         height: 160
  11.     }
  12. }

Then i run application with openGL Item and more other QML elements, do not overlap OpenGL item, i have 50% CPU usage!!:
main.qml

  1. import QtQuick 2.0
  2. import Graphics 1.0
  3. Rectangle {
  4.     width: 800
  5.     height: 600
  6.     color: "Gray"
  7.     GraphItem{
  8.         x: 230; y: 180
  9.         width: 210
  10.         height: 160
  11.     }
  12.     MyOtherItems{
  13.    // this contains many rectangles, texts and other
  14. }
  15. }


I conclude that Scene Graph Renderer render All items every time.

But i need render only OpenGL Item!

I found, that Qt Scene graph include alchoritm for partial scene update (qt-project.org/doc/qt-5.1/qtquick/qtquick-visualcanvas-scenegraph.html). Why this alghoritm not working for me?

My SGX driver version is 4.06.00.02.

My Qt version is 5.0.

My extra enviroment variables:
 TSLIB_FBDEVICE=/dev/fb0   
 TSLIB_TSDEVICE=/dev/input/event1
 TSLIB_CONFFILE=/etc/ts.conf
 TSLIB_CALIBFILE=/etc/pointercal
 TSLIB_CONSOLEDEVICE=none
 QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
 QT_QPA_EGLFS_WIDTH=800
 QT_QPA_EGLFS_HEIGHT=600
 QT_QPA_EGLFS_HIDECURSOR=1
 QML_RENDER_TIMING=23

My /etc/powervr.ini file is:

[default]
WindowSystem=libpvrPVR2D_FRONTWSEGL.so
ParamBufferSize=33554432

Application output:

evdevtouch: Using device /dev/input/event1
min X: 0 max X: 0
min Y: 0 max Y: 0
min pressure: 0 max pressure: 1023
device name: TPS6507x Touchscreen
Protocol type A
QTsLibMouseHandler "tslib" ""
- Breakdown of frame time; sync: 370 ms render: 995 ms swap: 0 ms total: 1365 ms time since last frame: 1 ms
- Breakdown of frame time; sync: 3 ms render: 74 ms swap: 1 ms total: 78 ms time since last frame: 99 ms
- Breakdown of frame time; sync: 1 ms render: 68 ms swap: 0 ms total: 69 ms time since last frame: 87 ms
- Breakdown of frame time; sync: 3 ms render: 26 ms swap: 0 ms total: 29 ms time since last frame: 31 ms
- Breakdown of frame time; sync: 1 ms render: 23 ms swap: 1 ms total: 25 ms time since last frame: 26 ms
- Breakdown of frame time; sync: 0 ms render: 49 ms swap: 1 ms total: 50 ms time since last frame: 51 ms
- Breakdown of frame time; sync: 1 ms render: 48 ms swap: 0 ms total: 49 ms time since last frame: 51 ms

When i build this applications on the desktop, CPU usage is constant (10% for other cases).

What i deal whrong? How render every time ONLY OpenGL QSGNode? How tuning EGLFS system for this?

  • Do the elements involve transparency ?

  • Thanks for reply!

    No, elements does not transparency.

    I found that this problem is also using QML Canvas Element.

    main.qml:

    Rectangle{

      Canvas{

             Timer { interval: 50; running: true; repeat: true; onTriggered: parent.requestPainting();  }
             onPaint: {           //some JS code for painting         }

      }

    }

    10% CPU usage

    main.qml:

    Rectangle{

      Canvas{

             Timer { interval: 50; running: true; repeat: true; onTriggered: parent.requestPainting();  }
             onPaint: {           //some JS code for painting         }

      }

      MyOtherItems{}

    }

    30% CPU usage !

    Changing Canvas::renderTarget and Canvas::RenderStrategy not give results.


    Ok..  How solve this problem? I need display QML Scene and show 50hz graph (plot) with axes and text marks in front.  Only I need deal this?