Canvas uses a lot of CPU

前端 未结 1 625
夕颜
夕颜 2020-12-21 21:16

I am using Canvas in QML to draw rotating Rectangle with OpenGL. Here is the code:

//...
property variant points: []

onPointsChang         


        
相关标签:
1条回答
  • 2020-12-21 22:20

    Consider using the new scene graph classes instead of Canvas if performance is critical. In particular, you'd be interested in the QSGGeometryNode class. If you prefer the simplicity of the Canvas API, you have to be aware of how it's best used. This article gives you some insight into that.

    Edit: I've also found improvements on embedded hardware (specifically the Raspberry Pi) using the QQuickPaintedItem class in certain cases.

    0 讨论(0)
提交回复
热议问题