Remove dependency to most of libutils
Most of libutils is replaced by using the STL,
this is fine in this case because none of it
leaks out of EGL’s internals.
Test: compiled & run
Bug: vndk-stable
Change-Id: I42ded4043ddc98ed7eaa975fbbb2e754cd3219af
diff --git a/opengl/libs/EGL/Loader.h b/opengl/libs/EGL/Loader.h
index 2dd4206..6a32bb3 100644
--- a/opengl/libs/EGL/Loader.h
+++ b/opengl/libs/EGL/Loader.h
@@ -19,9 +19,6 @@
#include <stdint.h>
-#include <utils/Errors.h>
-#include <utils/Singleton.h>
-
#include <EGL/egl.h>
// ----------------------------------------------------------------------------
@@ -30,9 +27,7 @@
struct egl_connection_t;
-class Loader : public Singleton<Loader> {
- friend class Singleton<Loader>;
-
+class Loader {
typedef __eglMustCastToProperFunctionPointerType (* getProcAddressType)(const char*);
enum {
@@ -43,17 +38,19 @@
struct driver_t {
explicit driver_t(void* gles);
~driver_t();
- status_t set(void* hnd, int32_t api);
+ // returns -errno
+ int set(void* hnd, int32_t api);
void* dso[3];
};
getProcAddressType getProcAddress;
public:
+ static Loader& getInstance();
~Loader();
void* open(egl_connection_t* cnx);
- status_t close(void* driver);
+ void close(void* driver);
private:
Loader();