为什么衰落的边缘慢? [英] Why are fading edges slow?

查看:115
本文介绍了为什么衰落的边缘慢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

注意到这个答案,在滚动型褪色边缘s时,可以很慢。我想知道,为什么?

As noted in this answer, fading edges in ScrollViews can be slow. I want to know, why?

使用衰落的边缘可能会带来明显的性能降级
  并且应当在需要时由应用程序的视觉仅用于
  设计。请求与API级别14褪色边缘以上,使用
  的android:requiresFadingEdge 属性,而不是

"Using fading edges may introduce noticeable performance degradations and should be used only when required by the application's visual design. To request fading edges with API level 14 and above, use the android:requiresFadingEdge attribute instead"

http://developer.android.com/reference/android/ R.attr.html#fadingEdge

我的兴趣是由两件事情的动机:

My interest is motivated by two things:


  • 想用褪色的边缘提供一个可视化的提示,用户

  • 注意到/极端/性能上的PowerVR SGX 544的Galaxy S4使用衰落的边缘时损失。 (20-30 fps的0.2 fps的下降),而不是-看到其他的GPU的性能损失(例如320的Adreno的HTC One)

我想,也许衰落的边缘被实现为SurfaceFlinger的独立层和它们触发GLES合成了硬件合成,但事实并非如此,根据<一个href=\"http://stackoverflow.com/questions/21642734/how-to-make-sense-of-dumpsys-surfaceflinger/21650767?noredirect=1#comment37547477_21650767\">this评论

I thought that maybe fading edges were implemented as separate layers in SurfaceFlinger and that they triggered GLES compositing over hardware compositing, but that is not so, according to this comment

推荐答案

更新: https://developers.google.com/events/io/sessions/325418001 约30罗曼分钟提到如何实施衰落的边缘实现,为什么让他们慢。

Update: https://developers.google.com/events/io/sessions/325418001 About 30 minutes in Romain mentions how fading edges are implemented and why the implementation makes them slow.

我来相信,在文档中的说明是在今天的情况下误导,而我偶然发现了一个不相关的病理糟糕的情况。我发现,通常衰落边缘不慢。链接后告诉我们罗曼对功能的角度来看,虽然说明是不添加,直到2011年九月

I am coming to believe that the note in the documentation is misleading in today's context, and that I stumbled upon an unrelated pathologically bad situation. I have found that normally fading edges are not slow. The linked post informs us of Romain's perspective on the feature, although the note wasn't added until Sept. 2011.

不同的系统使用不同的绘图的路径,不同GPU驱动器的路径,以及用于操作的衰落边缘的实际呈现不同的GPU硬件路径。我认为,由于场景的复杂,我试图显示我穿过我的电话特别的限制。

Different systems use different drawing paths, different GPU driver paths, and different GPU hardware paths for doing the actual rendering of the fading edges. I think that due to the complexity of the scene I was trying to display I crossed a limit of my particular phone.

<一个href=\"https://github.com/android/platform_frameworks_base/commit/1ef3fdbe047c805ce33b2be463ea51dec5952729\"相对=nofollow>这个承诺介绍了该说明。它是领先由到Android 4.0,而3.2.X系列仍在释放。我记得Xoom的是一个有点慢的设备,和我想象中的那几个衰落的边缘(容易被默认在做)可能把它拖到一分一秒过去。这似乎是一个很好的理由进行更改,并介绍了注意事项。

This commit introduced the note. It was made in the lead up to Android 4.0, while 3.2.x series were still being released. I remember the Xoom being a bit of a slow device, and I imagine that a few fading edges (easily made on by default) could have dragged it to a crawl. That seems like a good rationale to make the change and introduce the note.

这篇关于为什么衰落的边缘慢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆