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

Commit fa6fe1af authored by Peiyong Lin's avatar Peiyong Lin Committed by Android (Google) Code Review
Browse files

Merge "Don't fall back to system driver when driver apk fails."

parents 438e2561 db3ed6e6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -611,6 +611,10 @@ android_namespace_t* GraphicsEnv::getDriverNamespace() {
    return mDriverNamespace;
}

std::string GraphicsEnv::getDriverPath() const {
    return mDriverPath;
}

android_namespace_t* GraphicsEnv::getAngleNamespace() {
    std::lock_guard<std::mutex> lock(mNamespaceMutex);

+1 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ public:
    void setDriverPathAndSphalLibraries(const std::string path, const std::string sphalLibraries);
    // Get the updatable driver namespace.
    android_namespace_t* getDriverNamespace();
    std::string getDriverPath() const;

    /*
     * Apis for GpuStats
+5 −0
Original line number Diff line number Diff line
@@ -238,6 +238,11 @@ void* Loader::open(egl_connection_t* cnx)

    bool failToLoadFromDriverSuffixProperty = false;
    if (!hnd) {
        // If updated driver apk is set but fail to load, abort here.
        if (android::GraphicsEnv::getInstance().getDriverNamespace()) {
            LOG_ALWAYS_FATAL("couldn't find an OpenGL ES implementation from %s",
                             android::GraphicsEnv::getInstance().getDriverPath().c_str());
        }
        // Finally, try to load system driver, start by searching for the library name appended by
        // the system properties of the GLES userspace driver in both locations.
        // i.e.: