diff options
3 files changed, 0 insertions, 21 deletions
diff --git a/host/libs/virglrenderer/OpenGLESDispatch/EGLDispatch.cpp b/host/libs/virglrenderer/OpenGLESDispatch/EGLDispatch.cpp index 5b64ba5c0..f3de1bff6 100644 --- a/host/libs/virglrenderer/OpenGLESDispatch/EGLDispatch.cpp +++ b/host/libs/virglrenderer/OpenGLESDispatch/EGLDispatch.cpp @@ -15,9 +15,6 @@ */ #include "OpenGLESDispatch/EGLDispatch.h" -#include "android/base/synchronization/Lock.h" -#include "android/base/memory/LazyInstance.h" - #include "emugl/common/shared_library.h" #include <stdio.h> @@ -40,19 +37,7 @@ EGLDispatch s_egl; if (!s_egl.function_name || !s_egl.eglGetProcAddress) \ RENDER_EGL_LOAD_FIELD(return_type, function_name, signature) -struct AsyncEGLInitData { - bool initialized = false; - android::base::Lock lock; -}; - -static android::base::LazyInstance<AsyncEGLInitData> sInitData = - LAZY_INSTANCE_INIT; - bool init_egl_dispatch() { - android::base::AutoLock lock(sInitData->lock); - - if (sInitData->initialized) return true; - const char *libName = getenv("ANDROID_EGL_LIB"); if (!libName) libName = DEFAULT_EGL_LIB; char error[256]; @@ -67,7 +52,5 @@ bool init_egl_dispatch() { LIST_RENDER_EGL_EXTENSIONS_FUNCTIONS(RENDER_EGL_LOAD_OPTIONAL_FIELD) LIST_RENDER_EGL_SNAPSHOT_FUNCTIONS(RENDER_EGL_LOAD_FIELD) - sInitData->initialized = true; - return true; } diff --git a/host/libs/virglrenderer/OpenGLESDispatch/GLESv1Dispatch.cpp b/host/libs/virglrenderer/OpenGLESDispatch/GLESv1Dispatch.cpp index f40cb03ed..bda476c7f 100644 --- a/host/libs/virglrenderer/OpenGLESDispatch/GLESv1Dispatch.cpp +++ b/host/libs/virglrenderer/OpenGLESDispatch/GLESv1Dispatch.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ #include "OpenGLESDispatch/GLESv1Dispatch.h" -#include "OpenGLESDispatch/GLESv2Dispatch.h" #include "OpenGLESDispatch/EGLDispatch.h" @@ -116,7 +115,6 @@ LIST_GLES12_TR_FUNCTIONS(DEFINE_DUMMY_FUNCTION); } while(0); bool gles1_dispatch_init(GLESv1Dispatch* dispatch_table) { - init_egl_dispatch(); dispatch_table->underlying_gles2_api = NULL; diff --git a/host/libs/virglrenderer/OpenGLESDispatch/GLESv3Dispatch.cpp b/host/libs/virglrenderer/OpenGLESDispatch/GLESv3Dispatch.cpp index 4aecc14d8..aadc7c9ba 100644 --- a/host/libs/virglrenderer/OpenGLESDispatch/GLESv3Dispatch.cpp +++ b/host/libs/virglrenderer/OpenGLESDispatch/GLESv3Dispatch.cpp @@ -44,8 +44,6 @@ static GLESDispatchMaxVersion s_max_supported_gles_version = GLES_DISPATCH_MAX_V // bool gles2_dispatch_init(GLESv2Dispatch* dispatch_table) { - init_egl_dispatch(); - const char *libName = getenv("ANDROID_GLESv2_LIB"); if (!libName) { libName = DEFAULT_GLES_V2_LIB; |