diff --git a/services/surfaceflinger/DispSync.cpp b/services/surfaceflinger/DispSync.cpp index fd4682225..2ee757036 100644 --- a/services/surfaceflinger/DispSync.cpp +++ b/services/surfaceflinger/DispSync.cpp @@ -509,6 +509,7 @@ void DispSync::resetErrorLocked() { } nsecs_t DispSync::computeNextRefresh(int periodOffset) const { + Mutex::Autolock lock(mMutex); nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC); return (((now - mPhase) / mPeriod) + periodOffset + 1) * mPeriod + mPhase; }