qml opacitymask generates high CPU load (100%)



  • Hi,

    If I use the opacitymask (windows, qt 5.5 or qt 5.6) it uses a complete core.
    Is there any workaround for this bug?
    Can I use something similar to the opacitymask without this bug?

    CU
    mts



  • Has nobody seen the problem before or is there just no fix or workaround?


  • Moderators

    @themts Hi! Is it this one? QTBUG-49574



  • yes, somehow it's like that, besides I'm not using an AnimatedSprite.

    It seams that there is a problem as soon as there is any kind of animation working in background.
    Here is an example:

    Rectangle {
            anchors.fill: parent
            color: "black"
        }
    
        Rectangle {
            id: opSource
            color: "red"
            width: 150
            height: 150
            visible: false
        }
    
        Rectangle {
            id: mask
            width: 150
            height: 150
            visible: false
        }
    
        OpacityMask {
            x: 372
            y: 167
            width: 183
            height: 156
            source: opSource
            maskSource: mask
            opacity: 1
        }
    
        Rectangle {
            x: 1081
            y: 47
            width: 82
            height: 86
            visible: true
    
            SequentialAnimation on opacity {
                running: true
                loops: Animation.Infinite
                NumberAnimation { from: 0.3; to: 1.0; duration: 1500}
                NumberAnimation { from: 1.0; to: 0.3; duration: 1500}
            }
    
        }
    

    just put this code on an empty window and you will see that one core is at 100%.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.