Merge "Add mutex"

This commit is contained in:
Andy McFadden 2014-05-08 23:10:31 +00:00 committed by Android (Google) Code Review
commit d0ed571be0

View File

@ -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;
}