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/Loader.cpp b/opengl/libs/EGL/Loader.cpp
index 3d31e67..ba5a201 100644
--- a/opengl/libs/EGL/Loader.cpp
+++ b/opengl/libs/EGL/Loader.cpp
@@ -608,8 +608,10 @@
 }
 
 void Loader::attempt_to_init_angle_backend(void* dso, egl_connection_t* cnx) {
-    void* pANGLEGetDisplayPlatform = dlsym(dso, "ANGLEGetDisplayPlatform");
-    if (pANGLEGetDisplayPlatform) {
+    cnx->angleGetDisplayPlatformFunc = dlsym(dso, "ANGLEGetDisplayPlatform");
+    cnx->angleResetDisplayPlatformFunc = dlsym(dso, "ANGLEResetDisplayPlatform");
+
+    if (cnx->angleGetDisplayPlatformFunc) {
         ALOGV("ANGLE GLES library loaded");
         cnx->angleLoaded = true;
         android::GraphicsEnv::getInstance().setDriverToLoad(android::GpuStatsInfo::Driver::ANGLE);