What does "SurfaceView" represent in systrace result?
Asked Answered
P

1

0

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?

https://i.sstatic.net/n8MvG.png

Puberulent answered 27/3, 2014 at 0:37 Comment(0)
L
1

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.

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.

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

Louvenialouver answered 27/3, 2014 at 0:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.