Lines Matching refs:mPeriod
68 mPeriod(0), in DispSyncThread()
88 if (mPeriod != 0 && mPeriod != period && mReferenceTime != 0) { in updateModel()
93 const nsecs_t numOldPeriods = baseTime / mPeriod; in updateModel()
94 mReferenceTime = mReferenceTime + (numOldPeriods)*mPeriod; in updateModel()
96 mPeriod = period; in updateModel()
98 ATRACE_INT64("DispSync:Period", mPeriod); in updateModel()
99 ATRACE_INT64("DispSync:Phase", mPhase + mPeriod / 2); in updateModel()
104 mName, ns2us(mPeriod), ns2us(mPhase), ns2us(mReferenceTime)); in updateModel()
147 if (mPeriod == 0) { in threadLoop()
225 if (mPeriod != 0) { in addEventListener()
227 const nsecs_t numPeriodsSinceReference = baseTime / mPeriod; in addEventListener()
228 const nsecs_t predictedReference = mReferenceTime + numPeriodsSinceReference * mPeriod; in addEventListener()
234 listener.mLastEventTime = predictedLastEventTime - mPeriod; in addEventListener()
287 if (diff > mPeriod / 2) { in changePhaseOffset()
288 diff -= mPeriod; in changePhaseOffset()
289 } else if (diff < -mPeriod / 2) { in changePhaseOffset()
290 diff += mPeriod; in changePhaseOffset()
335 return duration < (3 * mPeriod) / 5; in isCloseToPeriod()
343 nsecs_t onePeriodAgo = now - mPeriod; in gatherCallbackInvocationsLocked()
404 baseTime = -mPeriod; in computeListenerNextEventTimeLocked()
407 nsecs_t numPeriods = baseTime / mPeriod; in computeListenerNextEventTimeLocked()
409 nsecs_t t = (numPeriods + 1) * mPeriod + phase; in computeListenerNextEventTimeLocked()
417 t += mPeriod; in computeListenerNextEventTimeLocked()
439 nsecs_t mPeriod; member in android::impl::DispSyncThread
565 mName, ns2us(mPeriod), ns2us(timestamp)); in addResyncSample()
572 if (std::abs(observedVsync - mPendingPeriod) < std::abs(observedVsync - mPeriod)) { in addResyncSample()
576 mPeriod = mPendingPeriod; in addResyncSample()
586 mThread->updateModel(mPeriod, mPhase, mReferenceTime); in addResyncSample()
655 return mPeriod; in getPeriod()
676 mPeriod = durationSum / (mNumResyncSamples - 3); in updateModelLocked()
678 ALOGV("[%s] mPeriod = %" PRId64, mName, ns2us(mPeriod)); in updateModelLocked()
682 double scale = 2.0 * M_PI / double(mPeriod); in updateModelLocked()
687 double samplePhase = double(sample % mPeriod) * scale; in updateModelLocked()
699 if (mPhase < -(mPeriod / 2)) { in updateModelLocked()
700 mPhase += mPeriod; in updateModelLocked()
705 mPeriod += mPeriod * mRefreshSkipCount; in updateModelLocked()
707 mThread->updateModel(mPeriod, mPhase, mReferenceTime); in updateModelLocked()
719 nsecs_t period = mPeriod / (1 + mRefreshSkipCount); in updateErrorLocked()
776 if (mPeriod == 0) { in computeNextRefresh()
779 return (((now - phase) / mPeriod) + periodOffset + 1) * mPeriod + phase; in computeNextRefresh()
793 StringAppendF(&result, "mPeriod: %" PRId64 " ns (%.3f fps; skipCount=%d)\n", mPeriod, in dump()
794 1000000000.0 / mPeriod, mRefreshSkipCount); in dump()
833 (presentTime - previous) / (double)mPeriod, in dump()