OpenGL: Moving comment to the right place
Test: Ensure Pixel4XL boot and driver loaded.
This does not have any functional change.
Bug: b/147019446
Change-Id: I8bbdb223e9f6d882e4d1b8cfd7a630f147e5c2d7
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index 768d3b5..2e183b3 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -172,10 +172,6 @@
// ----------------------------------------------------------------------------
-// this mutex protects:
-// d->disp[]
-// egl_init_drivers_locked()
-//
static EGLBoolean egl_init_drivers_locked() {
if (sEarlyInitState) {
// initialized by static ctor. should be set here.
@@ -211,6 +207,8 @@
return loader.load_glesv1_driver(cnx);
}
+// this mutex protects driver load logic as a critical section since it accesses to global variable
+// like gEGLImpl
static pthread_mutex_t sInitDriverMutex = PTHREAD_MUTEX_INITIALIZER;
EGLBoolean egl_init_drivers() {