我读过DispSync等的源代码,但它太复杂了。
据我所知,"FrameCallback“是由APP_VSYNC事件触发的,它可能与HW_VSYNC有时间偏差。那么,我怎么知道HW_VSYNC的确切时间呢?
如果FrameCallback的时间参数告诉APP_VSYNC时间,我可以从哪里获得HW_VSYNC和APP_VSYNC之间的偏移值,以便计算硬件虚拟同步时间?
发布于 2017-08-23 04:23:04
IIRC,编排报告的时间戳是APP_VSYNC时间。正如Grafika's 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()功能。有关其他说明,请参阅comment above doFrame()。
https://stackoverflow.com/questions/45710015
复制相似问题