Make a GLESv1 only entries for GLESv1 driver loading
This change creates a separate entry list for initializing gles1 apis
from the driver. With this change, the gl driver loading time for one
particular device reduced from ~180ms to ~40ms.
Bug: b/117526831
Test: dEQP-EGL.* and systrace on multiple devices
Change-Id: Ic2f6f1b8f4cd8f17db64b6e288769e2d6a7859eb
diff --git a/opengl/libs/EGL/Loader.h b/opengl/libs/EGL/Loader.h
index 6a32bb3..e88d1a2 100644
--- a/opengl/libs/EGL/Loader.h
+++ b/opengl/libs/EGL/Loader.h
@@ -29,7 +29,7 @@
class Loader {
typedef __eglMustCastToProperFunctionPointerType (* getProcAddressType)(const char*);
-
+
enum {
EGL = 0x01,
GLESv1_CM = 0x02,
@@ -42,25 +42,26 @@
int set(void* hnd, int32_t api);
void* dso[3];
};
-
+
getProcAddressType getProcAddress;
public:
static Loader& getInstance();
~Loader();
-
+
void* open(egl_connection_t* cnx);
void close(void* driver);
-
+
private:
Loader();
void *load_driver(const char* kind, egl_connection_t* cnx, uint32_t mask);
static __attribute__((noinline))
- void init_api(void* dso,
- char const * const * api,
- __eglMustCastToProperFunctionPointerType* curr,
- getProcAddressType getProcAddress);
+ void init_api(void* dso,
+ char const * const * api,
+ char const * const * ref_api,
+ __eglMustCastToProperFunctionPointerType* curr,
+ getProcAddressType getProcAddress);
};
// ----------------------------------------------------------------------------