首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >"Choreographer.FrameCallback“中的"FrameTimeNanos”是什么意思?HW_VSYNC时间还是APP_VSYNC时间?

"Choreographer.FrameCallback“中的"FrameTimeNanos”是什么意思?HW_VSYNC时间还是APP_VSYNC时间?
EN

Stack Overflow用户
提问于 2017-08-16 17:34:30
回答 1查看 458关注 0票数 1

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

据我所知,"FrameCallback“是由APP_VSYNC事件触发的,它可能与HW_VSYNC有时间偏差。那么,我怎么知道HW_VSYNC的确切时间呢?

如果FrameCallback的时间参数告诉APP_VSYNC时间,我可以从哪里获得HW_VSYNC和APP_VSYNC之间的偏移值,以便计算硬件虚拟同步时间?

EN

回答 1

Stack Overflow用户

发布于 2017-08-23 04:23:04

IIRC,编排报告的时间戳是APP_VSYNC时间。正如Grafika's ScheduledSwapActivity中的评论所指出的:

代码语言:javascript
复制
* 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()

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45710015

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档