diff options
| author | 2019-07-03 13:39:32 -0700 | |
|---|---|---|
| committer | 2019-09-20 13:57:24 -0700 | |
| commit | b1c1a377a84e06dd8ad17ddebbe30ddd1efa983f (patch) | |
| tree | 7448e0cb38970a19efe2c465c570fca110bb9ddd /libs/graphicsenv/GraphicsEnv.cpp | |
| parent | c27d3ddd2f8796963144666aa7d3d006ddcad35e (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: 141003796
Test: adb shell dumpsys gpu
Change-Id: I2907065a55d03a6c1494737e6f0a77f6e94272eb
Merged-In: I2907065a55d03a6c1494737e6f0a77f6e94272eb
Diffstat (limited to 'libs/graphicsenv/GraphicsEnv.cpp')
| -rw-r--r-- | libs/graphicsenv/GraphicsEnv.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp index 4a39069a0e..bb9e263ac4 100644 --- a/libs/graphicsenv/GraphicsEnv.cpp +++ b/libs/graphicsenv/GraphicsEnv.cpp @@ -269,14 +269,14 @@ static sp<IGpuService> getGpuService() { return interface_cast<IGpuService>(binder); } -void GraphicsEnv::setCpuVulkanInUse() { +void GraphicsEnv::setTargetStats(const 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); } } |