summaryrefslogtreecommitdiff
path: root/libs/graphicsenv/IGpuService.cpp
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2019-02-15 22:20:50 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-02-15 22:20:50 +0000
commit46c6532f355a09f618e378007151fb983ea82fb0 (patch)
tree5b2e133c7c7af5d9384aedef78c919455a841822 /libs/graphicsenv/IGpuService.cpp
parentb7c97e8ceb6a1926b7645631ff73d53953309cd2 (diff)
parentd986181df8ff886301adaf20404f886c730ba2c7 (diff)
Merge "Game Driver: plumb driver choice and loading time to GpuStats"
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;
}