summaryrefslogtreecommitdiffstats
path: root/opengl/libs/EGL/egl_display.h
diff options
context:
space:
mode:
Diffstat (limited to 'opengl/libs/EGL/egl_display.h')
-rw-r--r--opengl/libs/EGL/egl_display.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/opengl/libs/EGL/egl_display.h b/opengl/libs/EGL/egl_display.h
index 113595f..94077be 100644
--- a/opengl/libs/EGL/egl_display.h
+++ b/opengl/libs/EGL/egl_display.h
@@ -59,7 +59,7 @@ struct egl_config_t {
// ----------------------------------------------------------------------------
-class egl_display_t {
+class EGLAPI egl_display_t { // marked as EGLAPI for testing purposes
static egl_display_t sDisplay[NUM_DISPLAYS];
EGLDisplay getDisplay(EGLNativeDisplayType display);
@@ -81,7 +81,7 @@ public:
// remove object from this display's list
void removeObject(egl_object_t* object);
// add reference to this object. returns true if this is a valid object.
- bool getObject(egl_object_t* object);
+ bool getObject(egl_object_t* object) const;
static egl_display_t* get(EGLDisplay dpy);
@@ -91,6 +91,8 @@ public:
inline bool isValid() const { return magic == '_dpy'; }
inline bool isAlive() const { return isValid(); }
+ inline uint32_t getRefsCount() const { return refs; }
+
struct strings_t {
char const * vendor;
char const * version;
@@ -117,9 +119,9 @@ public:
egl_config_t* configs;
private:
- uint32_t refs;
- Mutex lock;
- SortedVector<egl_object_t*> objects;
+ uint32_t refs;
+ mutable Mutex lock;
+ SortedVector<egl_object_t*> objects;
};
// ----------------------------------------------------------------------------
@@ -141,4 +143,3 @@ EGLBoolean validate_display_surface(EGLDisplay dpy, EGLSurface surface);
// ----------------------------------------------------------------------------
#endif // ANDROID_EGL_DISPLAY_H
-