summaryrefslogtreecommitdiff
path: root/libs/graphicsenv/GraphicsEnv.cpp
diff options
context:
space:
mode:
author Yiwei Zhang <zzyiwei@google.com> 2019-07-03 13:39:32 -0700
committer Yiwei Zhang <zzyiwei@google.com> 2019-07-03 17:22:13 -0700
commitbcba4117941a0506971654331d89961b6fbfd3c0 (patch)
tree217dbdcb1c1f833a046eb2dd93a0ed8d3f2cc28f /libs/graphicsenv/GraphicsEnv.cpp
parent81e26a1c64a4249bd1245c8f5f5b03fba47d225d (diff)
GpuStats: refactor single stats pieces into a uniform way
This change makes it easy for adding single stats pieces into GpuService without adding or modifying the binder interface each time. Bug: 135210726 Test: adb shell dumpsys gpu Change-Id: I2907065a55d03a6c1494737e6f0a77f6e94272eb
Diffstat (limited to 'libs/graphicsenv/GraphicsEnv.cpp')
-rw-r--r--libs/graphicsenv/GraphicsEnv.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp
index a411dd56f6..c5d5f71800 100644
--- a/libs/graphicsenv/GraphicsEnv.cpp
+++ b/libs/graphicsenv/GraphicsEnv.cpp
@@ -267,14 +267,14 @@ static sp<IGpuService> getGpuService() {
return interface_cast<IGpuService>(binder);
}
-void GraphicsEnv::setCpuVulkanInUse() {
+void GraphicsEnv::setTargetStats(const GpuStatsInfo::Stats stats, const uint64_t value) {
ATRACE_CALL();
- // Use the same stats lock to protect getGpuService() as well.
std::lock_guard<std::mutex> lock(mStatsLock);
const sp<IGpuService> gpuService = getGpuService();
if (gpuService) {
- gpuService->setCpuVulkanInUse(mGpuStats.appPackageName, mGpuStats.driverVersionCode);
+ gpuService->setTargetStats(mGpuStats.appPackageName, mGpuStats.driverVersionCode, stats,
+ value);
}
}