GLES20Canvas.nDrawDisplayList 很慢
我有一个正在尝试显示的自定义视图,但是我看到它上面有一堆抖动。 一切都滚动缓慢,并且响应速度不及应有的水平。
我使用了 Traceview 并发现
GLES20Canvas.nDrawDisplayList
似乎需要花费大量时间来执行。
有什么帮助吗?
I have a custom view that I am trying to display, however I am seeing a bunch of jitter on it.
Everything scrolls slow and it isn't as responsive as it should be.
I used traceview and saw that
GLES20Canvas.nDrawDisplayList
seems responsible for taking a lot of time to execute.
Any help please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您绘制很多,尤其是非常大的视图,则 GLES20Canvas.nDrawDisplayList 预计会占用很大一部分时间。
如果您在跟踪视图中看到这一点,答案是“减少绘制”
在我的特定问题中,我在大视图上绘制了一个大的 alpha 图层。
我建议阅读 Android 3.0 硬件加速中的注意事项作者:罗曼·盖伊
GLES20Canvas.nDrawDisplayList is expected to have a large portion of the time if you are drawing a lot, especially very big views.
If you are seeing this all over your traceview the answer is "DRAW LESS"
In my specific issue I was drawing a large alpha layer over large views.
I would recommend reading the Do's and Dont's from Android 3.0 Hardware Acceleration by Romain Guy