Android QML canvas performance issue
Unsolved
Mobile and Embedded
-
I use Qt 5.7.1 on Android.
My app contains some QML animations. They run smoothly until I use QML canvas in my app:
Canvas { id: canvas onPaint: { var ctx = getContext("2d"); ctx.reset(); } } Timer { interval: 100; running: true; repeat: true onTriggered: canvas.requestPaint(); }
The canvas paint method does nothing, only resets context.
This code causes my app not to run smoothly. Is there a bug in QML canvas or is there something bad in my code?
-
@MartinD said in Android QML canvas performance issue:
canvas.requestPaint()
why do you need to call it?
-
@MartinD said in Android QML canvas performance issue:
I need to redraw canvas when some property changes
Why don't you redraw when those properties change instead of doing it via timer?