diff options
| -rw-r--r-- | libs/hwui/JankTracker.cpp | 1 | ||||
| -rw-r--r-- | libs/hwui/renderthread/RenderProxy.cpp | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libs/hwui/JankTracker.cpp b/libs/hwui/JankTracker.cpp index 4a2e30dd38f2..2cd9b7b39174 100644 --- a/libs/hwui/JankTracker.cpp +++ b/libs/hwui/JankTracker.cpp @@ -236,7 +236,6 @@ void JankTracker::dumpFrames(int fd) { } void JankTracker::reset() { - std::lock_guard lock(mDataMutex); mFrames.clear(); mData->reset(); (*mGlobalData)->reset(); diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp index b9568fcf8e66..423cc08189ca 100644 --- a/libs/hwui/renderthread/RenderProxy.cpp +++ b/libs/hwui/renderthread/RenderProxy.cpp @@ -230,7 +230,10 @@ void RenderProxy::dumpProfileInfo(int fd, int dumpFlags) { } void RenderProxy::resetProfileInfo() { - mRenderThread.queue().runSync([=]() { mContext->resetFrameStats(); }); + mRenderThread.queue().runSync([=]() { + std::lock_guard lock(mRenderThread.getJankDataMutex()); + mContext->resetFrameStats(); + }); } uint32_t RenderProxy::frameTimePercentile(int percentile) { |