commit | 150ecd8c1bd5543bf0a65ac838a7409131106716 | [log] [tgz] |
---|---|---|
author | Andy McFadden <fadden@android.com> | Thu May 08 14:56:50 2014 -0700 |
committer | Andy McFadden <fadden@android.com> | Thu May 08 14:56:50 2014 -0700 |
tree | 552410ae2c03ee5ebf18d37e675c8d507f25ec68 | |
parent | 98e1ebc026726ba045cea69b1b8c371d95db9893 [diff] [blame] |
Add mutex Change-Id: I81072031e74a5cca8384e4e8bce4babf2187d8bb
diff --git a/services/surfaceflinger/DispSync.cpp b/services/surfaceflinger/DispSync.cpp index fd46822..2ee7570 100644 --- a/services/surfaceflinger/DispSync.cpp +++ b/services/surfaceflinger/DispSync.cpp
@@ -509,6 +509,7 @@ } 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; }