diff options
Diffstat (limited to 'libs/graphicsenv/IGpuService.cpp')
-rw-r--r-- | libs/graphicsenv/IGpuService.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libs/graphicsenv/IGpuService.cpp b/libs/graphicsenv/IGpuService.cpp index 100dca598b..5f9624918f 100644 --- a/libs/graphicsenv/IGpuService.cpp +++ b/libs/graphicsenv/IGpuService.cpp @@ -91,6 +91,17 @@ public: outStats->clear(); return reply.readParcelableVector(outStats); } + + virtual void setCpuVulkanInUse(const std::string& appPackageName, + const uint64_t driverVersionCode) { + Parcel data, reply; + data.writeInterfaceToken(IGpuService::getInterfaceDescriptor()); + + data.writeUtf8AsUtf16(appPackageName); + data.writeUint64(driverVersionCode); + + remote()->transact(BnGpuService::SET_CPU_VULKAN_IN_USE, data, &reply, IBinder::FLAG_ONEWAY); + } }; IMPLEMENT_META_INTERFACE(GpuService, "android.graphicsenv.IGpuService"); @@ -163,6 +174,19 @@ status_t BnGpuService::onTransact(uint32_t code, const Parcel& data, Parcel* rep return OK; } + case SET_CPU_VULKAN_IN_USE: { + CHECK_INTERFACE(IGpuService, data, reply); + + std::string appPackageName; + if ((status = data.readUtf8FromUtf16(&appPackageName)) != OK) return status; + + uint64_t driverVersionCode; + if ((status = data.readUint64(&driverVersionCode)) != OK) return status; + + setCpuVulkanInUse(appPackageName, driverVersionCode); + + return OK; + } case SHELL_COMMAND_TRANSACTION: { int in = data.readFileDescriptor(); int out = data.readFileDescriptor(); |