Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 734a485f authored by Courtney Goeltzenleuchter's avatar Courtney Goeltzenleuchter
Browse files

Only run ANGLE rules once

Keep track if we've run the ANGLE rules and re-use the decision
if it's already been figured out.
Bug: 80239516
Test: manual, verify ANGLE rules processing message only occurs once.

Change-Id: I2673d2c940783137d6328d6b338d43c8691699a1
parent 36607ad0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -541,6 +541,8 @@ static void* load_angle(const char* kind, android_namespace_t* ns, egl_connectio

    if (use_angle) {
        ALOGV("User set \"Developer Options\" to force the use of ANGLE");
    } else if (cnx->angleDecided) {
        use_angle = cnx->useAngle;
    } else {
        // The "Developer Options" value wasn't set to force the use of ANGLE.  Need to temporarily
        // load ANGLE and call the updatable opt-in/out logic:
@@ -610,6 +612,7 @@ static void* load_angle(const char* kind, android_namespace_t* ns, egl_connectio
            use_angle = false;
            ALOGV("Could not temporarily-load the ANGLE opt-in/out logic, cannot use ANGLE.");
        }
        cnx->angleDecided = true;
    }
    if (use_angle) {
        so = load_angle_from_namespace(kind, ns);
+1 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ struct egl_connection_t {
    void*               libGles1;
    void*               libGles2;

    bool                angleDecided;
    bool                useAngle;
    EGLint              angleBackend;
    void*               vendorEGL;