I encoutered that using Canvas.drawPath(path,paint) is significantly slower than Canvas.drawLine() in a row or using Canvas.drawLines() instead. I can't give exact performance data, but I noticed on a Nexus 10 that the drawing was really slow (<10 FPS) by using path, while using drawLines was much smoother. Is there some implementation wrong or maybe a parameter to speed up the performance of this? As of now, I can't use drawPath() at all since the performance is such weak.
I was having an issue with drawPath as well (especially on my Nexus 10). My issue came down to I was setting a
strokePaint.setMaskFilter(new BlurMaskFilter(16f, BlurMaskFilter.Blur.NORMAL));
which made the performance horrible. 45 milliseconds execution to for Canvas.drawPath. Once I removed it I was getting execution times between 2-4 milliseconds
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With