diff options
Diffstat (limited to 'services/surfaceflinger/DispSync.cpp')
-rw-r--r-- | services/surfaceflinger/DispSync.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/services/surfaceflinger/DispSync.cpp b/services/surfaceflinger/DispSync.cpp index 12da9a5..3738a55 100644 --- a/services/surfaceflinger/DispSync.cpp +++ b/services/surfaceflinger/DispSync.cpp @@ -408,6 +408,12 @@ void DispSync::setPeriod(nsecs_t period) { mThread->updateModel(mPeriod, mPhase); } +nsecs_t DispSync::getPeriod() { + // lock mutex as mPeriod changes multiple times in updateModelLocked + Mutex::Autolock lock(mMutex); + return mPeriod; +} + void DispSync::updateModelLocked() { if (mNumResyncSamples >= MIN_RESYNC_SAMPLES_FOR_UPDATE) { nsecs_t durationSum = 0; |