summaryrefslogtreecommitdiff
path: root/libs/graphicsenv/IGpuService.cpp
diff options
context:
space:
mode:
author Yuxin Hu <yuxinhu@google.com> 2023-04-13 03:51:41 +0000
committer Yuxin Hu <yuxinhu@google.com> 2023-04-19 18:25:30 +0000
commitb69e9884fc1707141b21dbe1b67214e956e6f4a7 (patch)
tree891f2395a9b7fdf2c2b2eeb070a00de7e943d384 /libs/graphicsenv/IGpuService.cpp
parentccda33e2eb762b0f9ffff3de982011b6fc7f84ec (diff)
Add new API to toggle ANGLE as the default system GLES driver
Bug:b/270994705 Test: Flash, verify Pixel 7 can boot. Toggle the developer option switch. adb shell getprop persist.graphics.egl is returning right values with switch set on and off. Change-Id: Idce453d79e97c48cc965900315799784a001e053
Diffstat (limited to 'libs/graphicsenv/IGpuService.cpp')
-rw-r--r--libs/graphicsenv/IGpuService.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/graphicsenv/IGpuService.cpp b/libs/graphicsenv/IGpuService.cpp
index ceb52f71d8..4c070aec01 100644
--- a/libs/graphicsenv/IGpuService.cpp
+++ b/libs/graphicsenv/IGpuService.cpp
@@ -78,6 +78,15 @@ public:
IBinder::FLAG_ONEWAY);
}
+ void toggleAngleAsSystemDriver(bool enabled) override {
+ Parcel data, reply;
+ data.writeInterfaceToken(IGpuService::getInterfaceDescriptor());
+ data.writeBool(enabled);
+
+ remote()->transact(BnGpuService::TOGGLE_ANGLE_AS_SYSTEM_DRIVER, data, &reply,
+ IBinder::FLAG_ONEWAY);
+ }
+
std::string getUpdatableDriverPath() override {
Parcel data, reply;
data.writeInterfaceToken(IGpuService::getInterfaceDescriptor());
@@ -189,6 +198,15 @@ status_t BnGpuService::onTransact(uint32_t code, const Parcel& data, Parcel* rep
return OK;
}
+ case TOGGLE_ANGLE_AS_SYSTEM_DRIVER: {
+ CHECK_INTERFACE(IGpuService, data, reply);
+
+ bool enableAngleAsSystemDriver;
+ if ((status = data.readBool(&enableAngleAsSystemDriver)) != OK) return status;
+
+ toggleAngleAsSystemDriver(enableAngleAsSystemDriver);
+ return OK;
+ }
default:
return BBinder::onTransact(code, data, reply, flags);
}