什么是";FrameTimeNanos";平均值;编舞.FrameCallback"?HW



我已经阅读了DispSync等的源代码,但它太复杂了。

我了解到"FrameCallback"是由APP_VSYNC事件触发的,该事件可能与HW_VSYNC有时间偏移。那么,我怎么能知道HW_VSYNC的确切时间呢?

如果FrameCallback的时间参数告诉APP_VSYNC时间,我在哪里可以得到HW_VSYNC和APP_VSYNC之间的偏移值,以便计算硬件VSYNC时间?

IIRC,Choreographer报告的时间戳为APP_VSYNC次。如Grafika的ScheduledSwapActivity:中的评论所述

* We coordinate with the display refresh using Choreographer.  The SurfaceFlinger DispSync
* enhancements may cause the Choreographer-reported vsync time to be offset from the
* actual-reported vsync time (which may itself be slightly offset from the actual-actual
* vsync time).  None of this is terribly important unless you care about A/V sync.

如果A/V同步是您的目标,那么您可能应该使用setPresentationTime()功能。有关其他注意事项,请参阅doFrame()上面的注释。

最新更新