summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderProxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/renderthread/RenderProxy.cpp')
-rw-r--r--libs/hwui/renderthread/RenderProxy.cpp5
1 files changed, 4 insertions, 1 deletions
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) {