summaryrefslogtreecommitdiff
path: root/libs/graphicsenv/GraphicsEnv.cpp
diff options
context:
space:
mode:
author Simon Bowden <sbowden@google.com> 2022-04-25 15:49:42 +0000
committer Ian Elliott <ianelliott@google.com> 2022-04-27 12:55:52 +0000
commit2e62815e6a40ca52c004abbfd2095aee22796085 (patch)
tree9f4b0ee03d76085a1303204841f5dccee14abf93 /libs/graphicsenv/GraphicsEnv.cpp
parentb1633c4e2fe14ee6c94f9a897c28a9ef6be0771e (diff)
Revert "Change Android platform for when ANGLE is default"
Revert "Change Android platform for when ANGLE is default" Revert submission 17653617-DisableANGLE1 Reason for revert: b/230126358: candidate for test breakage on cf_x86_64_phone-userdebug Reverted Changes: I2446b18e9:Change Android platform for when ANGLE is default I83e59002b:Change Android platform for when ANGLE is default Change-Id: I3b8724abd6eb249c3060fffe0334622cdafdae89
Diffstat (limited to 'libs/graphicsenv/GraphicsEnv.cpp')
-rw-r--r--libs/graphicsenv/GraphicsEnv.cpp52
1 files changed, 4 insertions, 48 deletions
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp
index e4fbd6fe92..7f0cac5d4f 100644
--- a/libs/graphicsenv/GraphicsEnv.cpp
+++ b/libs/graphicsenv/GraphicsEnv.cpp
@@ -364,51 +364,26 @@ bool GraphicsEnv::shouldUseAngle() {
return (mUseAngle == YES) ? true : false;
}
-bool GraphicsEnv::forceLegacyDriver() {
- // Make sure we are init'ed
- if (mAngleAppName.empty()) {
- ALOGV("NOT SETUP YET.");
- return false;
- }
-
- return (mAngleIsSystemDriver == YES && mUseAngle == NO) ? true : false;
-}
-
-std::string GraphicsEnv::getLegacySuffix() {
- return mLegacyDriverSuffix;
-}
-
void GraphicsEnv::updateUseAngle() {
mUseAngle = NO;
const char* ANGLE_PREFER_ANGLE = "angle";
- const char* ANGLE_PREFER_LEGACY = "legacy";
- // The following is a deprecated version of "legacy"
const char* ANGLE_PREFER_NATIVE = "native";
mUseAngle = NO;
if (mAngleDeveloperOptIn == ANGLE_PREFER_ANGLE) {
- ALOGI("Using ANGLE, the %s GLES driver for package '%s'",
- mAngleIsSystemDriver == YES ? "system" : "optional", mAngleAppName.c_str());
+ ALOGV("User set \"Developer Options\" to force the use of ANGLE");
mUseAngle = YES;
- } else if (mAngleDeveloperOptIn == ANGLE_PREFER_LEGACY ||
- mAngleDeveloperOptIn == ANGLE_PREFER_NATIVE) {
- ALOGI("Using the (%s) Legacy GLES driver driver for package '%s'",
- mAngleIsSystemDriver == YES ? "optional" : "system", mAngleAppName.c_str());
+ } else if (mAngleDeveloperOptIn == ANGLE_PREFER_NATIVE) {
+ ALOGV("User set \"Developer Options\" to force the use of Native");
} else {
ALOGV("User set invalid \"Developer Options\": '%s'", mAngleDeveloperOptIn.c_str());
}
}
void GraphicsEnv::setAngleInfo(const std::string path, const std::string appName,
- const bool angleIsSystemDriver, const std::string developerOptIn,
+ const std::string developerOptIn,
const std::vector<std::string> eglFeatures) {
- // Set whether ANGLE is the system driver:
- mAngleIsSystemDriver = angleIsSystemDriver ? YES : NO;
-
- // Note: Given the current logic and lack of the old rules file processing,
- // there seems to be little chance that mUseAngle != UNKNOWN. Leave this
- // for now, even though it seems outdated.
if (mUseAngle != UNKNOWN) {
// We've already figured out an answer for this app, so just return.
ALOGV("Already evaluated the rules file for '%s': use ANGLE = %s", appName.c_str(),
@@ -429,25 +404,6 @@ void GraphicsEnv::setAngleInfo(const std::string path, const std::string appName
updateUseAngle();
}
-void GraphicsEnv::setLegacyDriverInfo(const std::string appName, const bool angleIsSystemDriver,
- const std::string legacyDriverName) {
- ALOGV("setting ANGLE app name to '%s'", appName.c_str());
- mAngleAppName = appName;
-
- // Force the use of the legacy driver instead of ANGLE
- const char* ANGLE_PREFER_LEGACY = "legacy";
- mAngleDeveloperOptIn = ANGLE_PREFER_LEGACY;
- ALOGV("setting ANGLE application opt-in to 'legacy'");
-
- // Set whether ANGLE is the system driver:
- mAngleIsSystemDriver = angleIsSystemDriver ? YES : NO;
-
- mLegacyDriverSuffix = legacyDriverName;
-
- // Update the current status of whether we should use ANGLE or not
- updateUseAngle();
-}
-
void GraphicsEnv::setLayerPaths(NativeLoaderNamespace* appNamespace, const std::string layerPaths) {
if (mLayerPaths.empty()) {
mLayerPaths = layerPaths;