Avoid double initialization of ANGLE platform.

Previously when ANGLE libraries were loaded, the loader already
attempted to dlsym the ANGLEGetDisplayPlatform method, but when
EGLDisplay is called everytime, it will always call into open the ANGLE
library again and attempt to dlsym ANGLEGetDisplayPlatform and
ANGLEResetDisplayPlatform, since ANGLE is already opened, the loader
should just dlsym once and bookkeep the results.

Bug: b/236050939
Test: trace no longer shows duplicate display platform call
Change-Id: I8ce2596c3b0968a4a2e9f7651f59d2ad67efbc64
diff --git a/opengl/libs/EGL/egldefs.h b/opengl/libs/EGL/egldefs.h
index 3bd37cb..90a3c19 100644
--- a/opengl/libs/EGL/egldefs.h
+++ b/opengl/libs/EGL/egldefs.h
@@ -42,7 +42,9 @@
             libGles1(nullptr),
             libGles2(nullptr),
             systemDriverUnloaded(false),
-            angleLoaded(false) {
+            angleLoaded(false),
+            angleGetDisplayPlatformFunc(nullptr),
+            angleResetDisplayPlatformFunc(nullptr) {
         const char* const* entries = platform_names;
         EGLFuncPointer* curr = reinterpret_cast<EGLFuncPointer*>(&platform);
         while (*entries) {
@@ -75,6 +77,9 @@
 
     bool systemDriverUnloaded;
     bool angleLoaded; // Was ANGLE successfully loaded
+
+    void* angleGetDisplayPlatformFunc;
+    void* angleResetDisplayPlatformFunc;
 };
 
 extern gl_hooks_t gHooks[2];