Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt Quick responsiveness and Open GL ES 2.0 conflict on iMX6q with Vivante

Qt Quick responsiveness and Open GL ES 2.0 conflict on iMX6q with Vivante

Scheduled Pinned Locked Moved QML and Qt Quick
opengl es2.0gpuqmlimx6
2 Posts 2 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    atessadri
    wrote on 6 May 2015, 15:19 last edited by
    #1

    I am developing an industrial video application on iMX6q equipped with Vivante GPU.
    My problem is that, since I use directly the GPU for heavy image processing, I don't have a responsive GUI base on Qt Quick 2.
    Qt Quick is based on OpenGL ES that is exactly the same API I am using for the video processing, so the GPU is quite never free to render Qt animations.

    I am trying to solve the problem using semaphores in order to stop video processing when there is a touch on the GUI (touch screen display).
    The result is as follow:

    1. the touch is immediatly taken from the Qt Quick GUI (MouseArea onPressed) and I am able to stop video processing using sem_wait()

    2. since the onPressed action triggers a state change for the button on the GUI, the related Transition animation is not fluent even if there is no more video processing ongoing

    3. I used the SequentialAnimation to trigger a script at the end on the Transition in order to restart the video processing but it seems that when the script is invoked the animation was not finished

       MouseArea {  
            id: mouseArea  
            anchors.fill: parent  
            hoverEnabled: true  
      
            onPressed: {  
                  semaGuiEvents.wait();  
                  container.state = "active";  
            }  
            onReleased: {  
                  container.state = "";  
            }  
       }  
      
       states: State {  
            name: "active";  
            PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 }  
        }   
      
        transitions: Transition {  
            SequentialAnimation {  
                NumberAnimation { properties: "scale"; duration: 100 }  
                ScriptAction { script: releaseGuiSem(); }  
            }  
        }  
      
       function releaseGuiSem() {  
            semaGuiEvents.post();  
       } 
      

    Since the Qt GUI is based on 2 threads (GUI thread + Rendering thread) I would like to know how to understand when the animation embedded in the transition is really finished.
    Is there any signal to catch ?

    Another issue is to understand when a transition animation starts.
    In my case, sometimes, I don't see the part of the animation related to state transition "normal" -> "active" because the call to semaGuiEvents.wait() stops the GUI thread waiting for the video processing to stop also (the video application will release the semaphore and it will stop again letting the Qt to go).

    Thanks

    Andrew (Milan, Italy)

    P 1 Reply Last reply 7 May 2015, 05:35
    0
    • A atessadri
      6 May 2015, 15:19

      I am developing an industrial video application on iMX6q equipped with Vivante GPU.
      My problem is that, since I use directly the GPU for heavy image processing, I don't have a responsive GUI base on Qt Quick 2.
      Qt Quick is based on OpenGL ES that is exactly the same API I am using for the video processing, so the GPU is quite never free to render Qt animations.

      I am trying to solve the problem using semaphores in order to stop video processing when there is a touch on the GUI (touch screen display).
      The result is as follow:

      1. the touch is immediatly taken from the Qt Quick GUI (MouseArea onPressed) and I am able to stop video processing using sem_wait()

      2. since the onPressed action triggers a state change for the button on the GUI, the related Transition animation is not fluent even if there is no more video processing ongoing

      3. I used the SequentialAnimation to trigger a script at the end on the Transition in order to restart the video processing but it seems that when the script is invoked the animation was not finished

         MouseArea {  
              id: mouseArea  
              anchors.fill: parent  
              hoverEnabled: true  
        
              onPressed: {  
                    semaGuiEvents.wait();  
                    container.state = "active";  
              }  
              onReleased: {  
                    container.state = "";  
              }  
         }  
        
         states: State {  
              name: "active";  
              PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 }  
          }   
        
          transitions: Transition {  
              SequentialAnimation {  
                  NumberAnimation { properties: "scale"; duration: 100 }  
                  ScriptAction { script: releaseGuiSem(); }  
              }  
          }  
        
         function releaseGuiSem() {  
              semaGuiEvents.post();  
         } 
        

      Since the Qt GUI is based on 2 threads (GUI thread + Rendering thread) I would like to know how to understand when the animation embedded in the transition is really finished.
      Is there any signal to catch ?

      Another issue is to understand when a transition animation starts.
      In my case, sometimes, I don't see the part of the animation related to state transition "normal" -> "active" because the call to semaGuiEvents.wait() stops the GUI thread waiting for the video processing to stop also (the video application will release the semaphore and it will stop again letting the Qt to go).

      Thanks

      Andrew (Milan, Italy)

      P Offline
      P Offline
      p3c0
      Moderators
      wrote on 7 May 2015, 05:35 last edited by
      #2

      Hi @atessadri,

      I would like to know how to understand when the animation embedded in the transition is really finished.
      Is there any signal to catch ?

      Yes there is. Transition has running property so you can use the onRunningChanged signal handler inside it. Eg:

      Transition {
        ...
        onRunningChanged: if(!running) console.log("Stopped")
      }
      

      Sorry I don't have answers to your other questions.

      157

      1 Reply Last reply
      0

      1/2

      6 May 2015, 15:19

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved