I'm facing quite slow calls of nSyncAndDrawFrame. I'm inheriting View (ViewGroup to be exact) and overriding onDraw to draw my stuff. When things are moving on my view, I'm calling invalidate() as soon as I finished drawing, so the view will initiate a new draw as soon as possible, and my items appear animated on the view. Problem is that during this draw cycles, I'm loosing much time due to nSyncAndDrawFrame calls.
I'm aware of this post but I'm not doing any bitmap draws, only using vectorial primitives to draw paths, shapes and texts.
On the below profiling screenshot, you can see my draw stuff taking approximatively 20ms, while the call to nSyncAndDrawFrame takes 40ms (efficiency ratio of 0.3 !)
- Is there something I can do on the view to fix this ?
- Should I use an other drawing way ?