diff options
| author | 2019-02-15 16:04:41 -0800 | |
|---|---|---|
| committer | 2019-02-15 16:12:35 -0800 | |
| commit | 512a723aaec6df4d4520637670c317a16a48b20f (patch) | |
| tree | fc6d8c383bd36afc7277f88892464705cd6566e2 /libs/graphicsenv/IGpuService.cpp | |
| parent | 79e0f7f4bbe65e0c44449ca1f335a39f5ade581a (diff) | |
Game Driver: plumb driver build date into GpuStats
Driver build date is used to track graphics driver age of the Android
ecosystem. This change also make the binder transaction async so that
both GL and Vulkan loaders won't be blocked by GpuStats module in the
GpuService.
Bug: 123156461
Test: Build, flash and boot. Verify the GpuService receiver side.
Change-Id: I89fd94613da2f5be7c28e5a5f8c3ec653f85cd2a
Diffstat (limited to 'libs/graphicsenv/IGpuService.cpp')
| -rw-r--r-- | libs/graphicsenv/IGpuService.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libs/graphicsenv/IGpuService.cpp b/libs/graphicsenv/IGpuService.cpp index 2a57caf739..a8a07c2863 100644 --- a/libs/graphicsenv/IGpuService.cpp +++ b/libs/graphicsenv/IGpuService.cpp @@ -29,20 +29,22 @@ public: virtual void setGpuStats(const std::string& driverPackageName, const std::string& driverVersionName, uint64_t driverVersionCode, - const std::string& appPackageName, GraphicsEnv::Driver driver, - bool isDriverLoaded, int64_t driverLoadingTime) { + const std::string& driverBuildDate, const std::string& appPackageName, + GraphicsEnv::Driver driver, bool isDriverLoaded, + int64_t driverLoadingTime) { Parcel data, reply; data.writeInterfaceToken(IGpuService::getInterfaceDescriptor()); data.writeUtf8AsUtf16(driverPackageName); data.writeUtf8AsUtf16(driverVersionName); data.writeUint64(driverVersionCode); + data.writeUtf8AsUtf16(driverBuildDate); data.writeUtf8AsUtf16(appPackageName); data.writeInt32(static_cast<int32_t>(driver)); data.writeBool(isDriverLoaded); data.writeInt64(driverLoadingTime); - remote()->transact(BnGpuService::SET_GPU_STATS, data, &reply); + remote()->transact(BnGpuService::SET_GPU_STATS, data, &reply, IBinder::FLAG_ONEWAY); } }; @@ -66,6 +68,9 @@ status_t BnGpuService::onTransact(uint32_t code, const Parcel& data, Parcel* rep uint64_t driverVersionCode; if ((status = data.readUint64(&driverVersionCode)) != OK) return status; + std::string driverBuildDate; + if ((status = data.readUtf8FromUtf16(&driverBuildDate)) != OK) return status; + std::string appPackageName; if ((status = data.readUtf8FromUtf16(&appPackageName)) != OK) return status; @@ -78,8 +83,8 @@ status_t BnGpuService::onTransact(uint32_t code, const Parcel& data, Parcel* rep int64_t driverLoadingTime; if ((status = data.readInt64(&driverLoadingTime)) != OK) return status; - setGpuStats(driverPackageName, driverVersionName, driverVersionCode, appPackageName, - static_cast<GraphicsEnv::Driver>(driver), isDriverLoaded, + setGpuStats(driverPackageName, driverVersionName, driverVersionCode, driverBuildDate, + appPackageName, static_cast<GraphicsEnv::Driver>(driver), isDriverLoaded, driverLoadingTime); return OK; |