diff options
| author | 2023-04-13 03:51:41 +0000 | |
|---|---|---|
| committer | 2023-04-19 18:25:30 +0000 | |
| commit | b69e9884fc1707141b21dbe1b67214e956e6f4a7 (patch) | |
| tree | 891f2395a9b7fdf2c2b2eeb070a00de7e943d384 /libs/graphicsenv/GraphicsEnv.cpp | |
| parent | ccda33e2eb762b0f9ffff3de982011b6fc7f84ec (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/GraphicsEnv.cpp')
| -rw-r--r-- | libs/graphicsenv/GraphicsEnv.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp index 46dd62d3bf..c480056b40 100644 --- a/libs/graphicsenv/GraphicsEnv.cpp +++ b/libs/graphicsenv/GraphicsEnv.cpp @@ -689,4 +689,13 @@ android_namespace_t* GraphicsEnv::getAngleNamespace() { return mAngleNamespace; } +void GraphicsEnv::nativeToggleAngleAsSystemDriver(bool enabled) { + const sp<IGpuService> gpuService = getGpuService(); + if (!gpuService) { + ALOGE("No GPU service"); + return; + } + gpuService->toggleAngleAsSystemDriver(enabled); +} + } // namespace android |