I'm running into an interesting issue with Android devices with what it appears to be armeabi-v7 CPUs where the call flush is incredibly slow. However, using a secondary SkSurface as raster it flushes noticeably faster. This issue does not happen with arm64 devices AFAIK.
SkSurface main; << With GPU target.
SkSurface drawSurface = main.makeSurface(main.imageInfo()) // << SLOW
//SkSurface drawSurface = SkSurface::MakeRaster(SkImageInfo::MakeN32Premul(size)) // <<< FASTER
I then do multiple rect drawings:
Update main Surface
Skcanvas canvas = main.getCanvas()
drawSurface.draw(canvas, 0, 0, null)
Here's what I was able to deduce from various tests.
1. Using drawSurface that is GPU backed is noticeably faster to draw things into it as one would expect.
2. Calling flush on the main surface canvas is much faster if the drawSurface is RASTER backed. Crazy?
What could be wrong? I built Skia m87, with target_os="android" and target_cpu="arm". I'm kinda running out of options. :( Thanks for any help.