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
diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp
index 23506ba..a53bb59 100644
--- a/vulkan/libvulkan/driver.cpp
+++ b/vulkan/libvulkan/driver.cpp
@@ -1176,7 +1176,8 @@
if (properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU) {
// Log that the app is hitting software Vulkan implementation
- android::GraphicsEnv::getInstance().setCpuVulkanInUse();
+ android::GraphicsEnv::getInstance().setTargetStats(
+ android::GraphicsEnv::Stats::CPU_VULKAN_IN_USE);
}
data->driver_device = dev;