summaryrefslogtreecommitdiff
path: root/libs/graphicsenv/GraphicsEnv.cpp
diff options
context:
space:
mode:
author Peiyong Lin <lpy@google.com> 2023-07-07 16:46:16 +0000
committer Peiyong Lin <lpy@google.com> 2023-10-17 22:47:17 +0000
commit28a4b078dba128e0e4355fd5fa1c7e1354d7596d (patch)
tree8689b3fd4a9bb19532ae8143868c47bdaba3e966 /libs/graphicsenv/GraphicsEnv.cpp
parent1a51213576876ca94f225531dc248eddb2890bbc (diff)
[Cherry-pick] Revert "Load native GLES driver when specified."
This reverts commit 0d60e80ad8162e791305dfb8844a59f1ef9840d3. Reason for revert: culprit of boot memory regression Original commit message: """ Load native GLES driver when specified. Since ANGLE and native GLES drivers can coexist, when native is specified, the loader must load the native GLES drivers specified in ro.hardware.egl. This patch adds the support to load native GLES drivers when specified. Bug: b/283858001 Test: atest CtsAngleDeveloperOptionHostTest -c with ANGLE being default Test: atest CtsAngleDeveloperOptionHostTest -c with native being default """ Bug: b/283858001 Bug: b/289956225 Test: forrest test Change-Id: I785d2d3ff8dd21a1a207ccd814b5dddb080e9b52 Merged-In: I785d2d3ff8dd21a1a207ccd814b5dddb080e9b52
Diffstat (limited to 'libs/graphicsenv/GraphicsEnv.cpp')
-rw-r--r--libs/graphicsenv/GraphicsEnv.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp
index ed5d5c1095..0a5416128e 100644
--- a/libs/graphicsenv/GraphicsEnv.cpp
+++ b/libs/graphicsenv/GraphicsEnv.cpp
@@ -530,11 +530,7 @@ bool GraphicsEnv::shouldUseAngle() {
return mShouldUseAngle;
}
-// Set ANGLE information.
-// If path is "system", it means system ANGLE must be used for the process.
-// If shouldUseNativeDriver is true, it means native GLES drivers must be used for the process.
-// If path is set to nonempty and shouldUseNativeDriver is true, ANGLE will be used regardless.
-void GraphicsEnv::setAngleInfo(const std::string& path, const bool shouldUseNativeDriver,
+void GraphicsEnv::setAngleInfo(const std::string& path, const bool shouldUseSystemAngle,
const std::string& packageName,
const std::vector<std::string> eglFeatures) {
if (mShouldUseAngle) {
@@ -551,13 +547,8 @@ void GraphicsEnv::setAngleInfo(const std::string& path, const bool shouldUseNati
mAnglePath = std::move(path);
ALOGV("setting app package name to '%s'", packageName.c_str());
mPackageName = std::move(packageName);
- if (mAnglePath == "system") {
- mShouldUseSystemAngle = true;
- }
- if (!mAnglePath.empty()) {
- mShouldUseAngle = true;
- }
- mShouldUseNativeDriver = shouldUseNativeDriver;
+ mShouldUseAngle = true;
+ mShouldUseSystemAngle = shouldUseSystemAngle;
}
std::string& GraphicsEnv::getPackageName() {
@@ -634,10 +625,6 @@ bool GraphicsEnv::shouldUseSystemAngle() {
return mShouldUseSystemAngle;
}
-bool GraphicsEnv::shouldUseNativeDriver() {
- return mShouldUseNativeDriver;
-}
-
/**
* APIs for debuggable layers
*/