When debugging our phone, we found that the first frame when opening a desktop folder is very slow. After investigation, we discovered that the slowness occurs during the icon drawing process. In the call stack, it eventually calls our program's com.miui.home.launcher.graphics.drawable.LayerAdaptiveIconDrawable.draw. Delving deeper, we found that a single call to SkBitmapDevice::drawImageRect takes 6ms. If there are 8 icons in a folder, it takes 48ms. However, the size of a single icon is only 200*200.
But once the first frame has passed, subsequent calls to LayerAdaptiveIconDrawable.draw become much faster, around 100us.
Since the slowdown occurs within a Skia function and eventually seems to be an anonymous function after compilation, we do not understand why it is slow at this point.
Can anyone provide some insights?
--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/5b54f9be-9e7f-4ce8-bfe0-d738829cb011n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/17cf7d51-b259-4308-9f71-a489fd04c911n%40googlegroups.com.