Increment/decrement a counter around EGL calls
This is in preparation for a change that will hibernate the underlying
EGL when idle. Instead of a bare egl_display_t*, get_display() now
returns a egl_display_ptr, which acts like a smart pointer. The
"wakecount" counter managed by the smart pointer isn't used for
anything in this change. It will be used to make sure we don't
hibernate when any thread is in an EGL call, without having to hold a
mutex for the duration of the call.
Change-Id: Iee52f3549a51162efc3800e1195d3f76bba2f2ce
diff --git a/opengl/libs/EGL/egl_object.h b/opengl/libs/EGL/egl_object.h
index 4d91f54..d1162db 100644
--- a/opengl/libs/EGL/egl_object.h
+++ b/opengl/libs/EGL/egl_object.h
@@ -139,12 +139,11 @@
public:
typedef egl_object_t::LocalRef<egl_surface_t, EGLSurface> Ref;
- egl_surface_t(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win,
- EGLSurface surface, egl_connection_t const* cnx) :
- egl_object_t(get_display(dpy)), dpy(dpy), surface(surface),
- config(config), win(win), cnx(cnx) {
- }
- EGLDisplay dpy;
+ egl_surface_t(egl_display_t* dpy, EGLConfig config,
+ EGLNativeWindowType win, EGLSurface surface,
+ egl_connection_t const* cnx) :
+ egl_object_t(dpy), surface(surface), config(config), win(win), cnx(cnx)
+ {}
EGLSurface surface;
EGLConfig config;
sp<ANativeWindow> win;