summaryrefslogtreecommitdiff
path: root/libs/graphicsenv/IGpuService.cpp
diff options
context:
space:
mode:
author Yiwei Zhang <zzyiwei@google.com> 2019-02-13 11:51:55 -0800
committer Yiwei Zhang <zzyiwei@google.com> 2019-02-13 18:12:02 -0800
commitd986181df8ff886301adaf20404f886c730ba2c7 (patch)
tree76bf69a95863bc89baa736a11eea5cadbdee743b /libs/graphicsenv/IGpuService.cpp
parent101843de76cfd5a5b2c4cd8ffaf6f973f96c8c04 (diff)
Game Driver: plumb driver choice and loading time to GpuStats
This change plumb the below info from GL and Vulkan loader: 1. Intended driver to use 2. Whether intended driver is loaded 3. Total driver loading time Bug: 123529932 Test: Build, flash and boot. Verify the GpuService receiver side. Change-Id: I967d4361bf0e04c02390c7555617575c19ecadd4
Diffstat (limited to 'libs/graphicsenv/IGpuService.cpp')
-rw-r--r--libs/graphicsenv/IGpuService.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/libs/graphicsenv/IGpuService.cpp b/libs/graphicsenv/IGpuService.cpp
index 762a27b799..2a57caf739 100644
--- a/libs/graphicsenv/IGpuService.cpp
+++ b/libs/graphicsenv/IGpuService.cpp
@@ -28,8 +28,9 @@ public:
explicit BpGpuService(const sp<IBinder>& impl) : BpInterface<IGpuService>(impl) {}
virtual void setGpuStats(const std::string& driverPackageName,
- const std::string& driverVersionName, const uint64_t driverVersionCode,
- const std::string& appPackageName) {
+ const std::string& driverVersionName, uint64_t driverVersionCode,
+ const std::string& appPackageName, GraphicsEnv::Driver driver,
+ bool isDriverLoaded, int64_t driverLoadingTime) {
Parcel data, reply;
data.writeInterfaceToken(IGpuService::getInterfaceDescriptor());
@@ -37,6 +38,9 @@ public:
data.writeUtf8AsUtf16(driverVersionName);
data.writeUint64(driverVersionCode);
data.writeUtf8AsUtf16(appPackageName);
+ data.writeInt32(static_cast<int32_t>(driver));
+ data.writeBool(isDriverLoaded);
+ data.writeInt64(driverLoadingTime);
remote()->transact(BnGpuService::SET_GPU_STATS, data, &reply);
}
@@ -65,7 +69,18 @@ status_t BnGpuService::onTransact(uint32_t code, const Parcel& data, Parcel* rep
std::string appPackageName;
if ((status = data.readUtf8FromUtf16(&appPackageName)) != OK) return status;
- setGpuStats(driverPackageName, driverVersionName, driverVersionCode, appPackageName);
+ int32_t driver;
+ if ((status = data.readInt32(&driver)) != OK) return status;
+
+ bool isDriverLoaded;
+ if ((status = data.readBool(&isDriverLoaded)) != OK) return status;
+
+ int64_t driverLoadingTime;
+ if ((status = data.readInt64(&driverLoadingTime)) != OK) return status;
+
+ setGpuStats(driverPackageName, driverVersionName, driverVersionCode, appPackageName,
+ static_cast<GraphicsEnv::Driver>(driver), isDriverLoaded,
+ driverLoadingTime);
return OK;
}