本文是针对SW VSYNC模型更新与校准这部分的理解和补充,建议先看努比亚的文章再看我这个文章。 1.根据采样的时间戳更新模型 对应SurfaceFlinger模块-VSYNC研究文章中3.2 1 addVsyncTimestamp章节。 通过着6个样本,计算出x的因变量集合 ordinals,和y的自变量集合vsyncTS。通过6个样本把这两个集合的数据都计算出来,然...
Vector<sp<EventThread::Connection>>EventThread::waitForEvent(DisplayEventReceiver::Event*event){Mutex::Autolock_l(mLock);Vector<sp<EventThread::Connection>>signalConnections;do{booleventPending=false;boolwaitForVSync=false;size_t vsyncCount=0;nsecs_t timestamp=0;for(int32_ti=0;i<DisplayDevice:...
currentPeriod 在90hz屏幕下固定值为11111111,vsyncTS[i] 就是y集合中数字,其中kScalingFactor 放大因子为1000, 根据以下公式,可以得到x的集合 staticconstexprint64_tkScalingFactor=1000;ordinals[i]=((vsyncTS[i]+(currentPeriod/2))/currentPeriod)*kScalingFactor; 所以我们根据传入的六个连续vsync时间戳得到...