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.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index e14842f89b61..b9568fcf8e66 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -215,6 +215,7 @@ void RenderProxy::notifyFramePending() {
void RenderProxy::dumpProfileInfo(int fd, int dumpFlags) {
mRenderThread.queue().runSync([&]() {
+ std::lock_guard lock(mRenderThread.getJankDataMutex());
mContext->profiler().dumpData(fd);
if (dumpFlags & DumpFlags::FrameStats) {
mContext->dumpFrames(fd);
@@ -234,6 +235,7 @@ void RenderProxy::resetProfileInfo() {
uint32_t RenderProxy::frameTimePercentile(int percentile) {
return mRenderThread.queue().runSync([&]() -> auto {
+ std::lock_guard lock(mRenderThread.globalProfileData().getDataMutex());
return mRenderThread.globalProfileData()->findPercentile(percentile);
});
}