Loading opengl/libs/EGL/Loader.cpp +6 −18 Original line number Original line Diff line number Diff line Loading @@ -222,13 +222,6 @@ void* Loader::open(egl_connection_t* cnx) return cnx->dso; return cnx->dso; } } // Check if we should use ANGLE early, so loading each driver doesn't require repeated queries. if (android::GraphicsEnv::getInstance().shouldUseAngle()) { cnx->shouldUseAngle = true; } else { cnx->shouldUseAngle = false; } // Firstly, try to load ANGLE driver. // Firstly, try to load ANGLE driver. driver_t* hnd = attempt_to_load_angle(cnx); driver_t* hnd = attempt_to_load_angle(cnx); if (!hnd) { if (!hnd) { Loading Loading @@ -317,8 +310,6 @@ void Loader::close(egl_connection_t* cnx) delete hnd; delete hnd; cnx->dso = nullptr; cnx->dso = nullptr; cnx->shouldUseAngle = false; cnx->angleDecided = false; cnx->useAngle = false; cnx->useAngle = false; if (cnx->vendorEGL) { if (cnx->vendorEGL) { Loading Loading @@ -512,14 +503,7 @@ static void* load_angle_from_namespace(const char* kind, android_namespace_t* ns } } static void* load_angle(const char* kind, android_namespace_t* ns, egl_connection_t* cnx) { static void* load_angle(const char* kind, android_namespace_t* ns, egl_connection_t* cnx) { void* so = nullptr; void* so = load_angle_from_namespace(kind, ns); if ((cnx->shouldUseAngle) || android::GraphicsEnv::getInstance().shouldUseAngle()) { so = load_angle_from_namespace(kind, ns); cnx->shouldUseAngle = true; } else { cnx->shouldUseAngle = false; } if (so) { if (so) { ALOGV("Loaded ANGLE %s library for '%s' (instead of native)", kind, ALOGV("Loaded ANGLE %s library for '%s' (instead of native)", kind, Loading Loading @@ -569,7 +553,6 @@ static void* load_angle(const char* kind, android_namespace_t* ns, egl_connectio android::GraphicsEnv::getInstance().getAngleAppName().c_str()); android::GraphicsEnv::getInstance().getAngleAppName().c_str()); cnx->useAngle = false; cnx->useAngle = false; } } cnx->angleDecided = true; return so; return so; } } Loading Loading @@ -597,6 +580,11 @@ static void* load_updated_driver(const char* kind, android_namespace_t* ns) { Loader::driver_t* Loader::attempt_to_load_angle(egl_connection_t* cnx) { Loader::driver_t* Loader::attempt_to_load_angle(egl_connection_t* cnx) { ATRACE_CALL(); ATRACE_CALL(); if (!android::GraphicsEnv::getInstance().shouldUseAngle()) { return nullptr; } android_namespace_t* ns = android::GraphicsEnv::getInstance().getAngleNamespace(); android_namespace_t* ns = android::GraphicsEnv::getInstance().getAngleNamespace(); if (!ns) { if (!ns) { return nullptr; return nullptr; Loading opengl/libs/EGL/egldefs.h +0 −2 Original line number Original line Diff line number Diff line Loading @@ -81,8 +81,6 @@ struct egl_connection_t { void* libGles2; void* libGles2; bool systemDriverUnloaded; bool systemDriverUnloaded; bool shouldUseAngle; // Should we attempt to load ANGLE bool angleDecided; // Have we tried to load ANGLE bool useAngle; // Was ANGLE successfully loaded bool useAngle; // Was ANGLE successfully loaded EGLint angleBackend; EGLint angleBackend; void* vendorEGL; void* vendorEGL; Loading Loading
opengl/libs/EGL/Loader.cpp +6 −18 Original line number Original line Diff line number Diff line Loading @@ -222,13 +222,6 @@ void* Loader::open(egl_connection_t* cnx) return cnx->dso; return cnx->dso; } } // Check if we should use ANGLE early, so loading each driver doesn't require repeated queries. if (android::GraphicsEnv::getInstance().shouldUseAngle()) { cnx->shouldUseAngle = true; } else { cnx->shouldUseAngle = false; } // Firstly, try to load ANGLE driver. // Firstly, try to load ANGLE driver. driver_t* hnd = attempt_to_load_angle(cnx); driver_t* hnd = attempt_to_load_angle(cnx); if (!hnd) { if (!hnd) { Loading Loading @@ -317,8 +310,6 @@ void Loader::close(egl_connection_t* cnx) delete hnd; delete hnd; cnx->dso = nullptr; cnx->dso = nullptr; cnx->shouldUseAngle = false; cnx->angleDecided = false; cnx->useAngle = false; cnx->useAngle = false; if (cnx->vendorEGL) { if (cnx->vendorEGL) { Loading Loading @@ -512,14 +503,7 @@ static void* load_angle_from_namespace(const char* kind, android_namespace_t* ns } } static void* load_angle(const char* kind, android_namespace_t* ns, egl_connection_t* cnx) { static void* load_angle(const char* kind, android_namespace_t* ns, egl_connection_t* cnx) { void* so = nullptr; void* so = load_angle_from_namespace(kind, ns); if ((cnx->shouldUseAngle) || android::GraphicsEnv::getInstance().shouldUseAngle()) { so = load_angle_from_namespace(kind, ns); cnx->shouldUseAngle = true; } else { cnx->shouldUseAngle = false; } if (so) { if (so) { ALOGV("Loaded ANGLE %s library for '%s' (instead of native)", kind, ALOGV("Loaded ANGLE %s library for '%s' (instead of native)", kind, Loading Loading @@ -569,7 +553,6 @@ static void* load_angle(const char* kind, android_namespace_t* ns, egl_connectio android::GraphicsEnv::getInstance().getAngleAppName().c_str()); android::GraphicsEnv::getInstance().getAngleAppName().c_str()); cnx->useAngle = false; cnx->useAngle = false; } } cnx->angleDecided = true; return so; return so; } } Loading Loading @@ -597,6 +580,11 @@ static void* load_updated_driver(const char* kind, android_namespace_t* ns) { Loader::driver_t* Loader::attempt_to_load_angle(egl_connection_t* cnx) { Loader::driver_t* Loader::attempt_to_load_angle(egl_connection_t* cnx) { ATRACE_CALL(); ATRACE_CALL(); if (!android::GraphicsEnv::getInstance().shouldUseAngle()) { return nullptr; } android_namespace_t* ns = android::GraphicsEnv::getInstance().getAngleNamespace(); android_namespace_t* ns = android::GraphicsEnv::getInstance().getAngleNamespace(); if (!ns) { if (!ns) { return nullptr; return nullptr; Loading
opengl/libs/EGL/egldefs.h +0 −2 Original line number Original line Diff line number Diff line Loading @@ -81,8 +81,6 @@ struct egl_connection_t { void* libGles2; void* libGles2; bool systemDriverUnloaded; bool systemDriverUnloaded; bool shouldUseAngle; // Should we attempt to load ANGLE bool angleDecided; // Have we tried to load ANGLE bool useAngle; // Was ANGLE successfully loaded bool useAngle; // Was ANGLE successfully loaded EGLint angleBackend; EGLint angleBackend; void* vendorEGL; void* vendorEGL; Loading