&是什么QUOT; SurfaceView"重新present在systrace结果呢? [英] What does "SurfaceView" represent in systrace result?

查看:335
本文介绍了&是什么QUOT; SurfaceView"重新present在systrace结果呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在调查的游戏口吃问题,我发现bewteen从SurfaceFlinger的游戏和postFramebuffer()eglSwapBuffer(),总有SurfaceView延迟0.5ms的,从持续时间为10ms,这似乎pretty随机并无关CPU的负载。这究竟是重新presents?它是否有任何与显示器的VSYNC点?

When investigating an game play stuttering issue, I found that bewteen eglSwapBuffer() from the game and postFramebuffer() in surfaceflinger, there is always a delay in "SurfaceView" lasts from 0.5ms to 10ms which seems pretty random and irrelevant to CPU load. What does this really represents? Does it has anything to do with VSYNC point of display?

http://i.stack.imgur.com/n8MvG.png

推荐答案

这行再presents一个BufferQueue。 (在你的踪迹的可见部分0或1)元素的高度表示有多少缓冲队列中的present。

That row represents a BufferQueue. The height of the element (0 or 1 in the visible portion of your trace) indicates how many buffers are present in the queue.

在这种情况下,它是正在psented上的SurfaceView表面$ P $图形缓冲区的队列。当你的应用程序调用 eglSwapBuffers(),它提交一个缓冲区队列中。当SurfaceFlinger的上一个VSYNC信号唤醒时,它锁存从如果有一个可用的队列的缓冲器,和复合材料它为下一次刷新

In this case, it's the queue of graphics buffers that are being presented on your SurfaceView Surface. When your app calls eglSwapBuffers(), it submits a buffer to the queue. When SurfaceFlinger wakes up on a VSYNC signal, it latches a buffer from the queue if one is available, and composites it for the next refresh.

更新: BufferQueues及其应用在一些细节描述这里。附录C中提到他们的systrace外观。

Update: BufferQueues and their uses are described in some detail here. Appendix C mentions their appearance in systrace.

这篇关于&是什么QUOT; SurfaceView"重新present在systrace结果呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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