CoreAnimation performance profiling - CAReplicatorLayer with CAShapeLayer

霸气de小男生 提交于 2020-01-01 14:23:22

问题


I'm making an app that relies on CoreAnimation. It has got a CAReplicatorLayer and as a sublayer a CAShapeLayer. When having 12 replications and then animating the path (changing it on touchMoved) there's a significant reduction in FPS once the graphics get bigger on screen (about 12-20 fps).

The time profiler shows about 10 % CPU Utilization, the Open GL ES Driver profiler reports about 90-97% "Render Utilization" and 40-50 % "Tiler Utilization".

This guide explains these two words but not to a great detail. Can anybody explain what these two are exactly? Apple Docs

Apparently the high Render Utilization is the problem, so what can I do to improve the performance?


回答1:


The solution to this was to remove all UI elements with transparency from the screen (or setting them to opaque).

The fillrate suffers highly when rendering an animated CAShapeLayer under or above UI elements with transparency.

After optimizing this, the render utilization went down to 30-40 percent.



来源:https://stackoverflow.com/questions/22156543/coreanimation-performance-profiling-careplicatorlayer-with-cashapelayer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!