summaryrefslogtreecommitdiffstats
path: root/opengl/tools/glgen/static/egl/EGLObjectHandle.java
diff options
context:
space:
mode:
Diffstat (limited to 'opengl/tools/glgen/static/egl/EGLObjectHandle.java')
-rw-r--r--opengl/tools/glgen/static/egl/EGLObjectHandle.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/opengl/tools/glgen/static/egl/EGLObjectHandle.java b/opengl/tools/glgen/static/egl/EGLObjectHandle.java
index 01f9bd4..d2710de 100644
--- a/opengl/tools/glgen/static/egl/EGLObjectHandle.java
+++ b/opengl/tools/glgen/static/egl/EGLObjectHandle.java
@@ -18,16 +18,30 @@
package android.opengl;
/**
- * @hide
+ * Base class for wrapped EGL objects.
+ *
*/
public abstract class EGLObjectHandle {
private final int mHandle;
- public EGLObjectHandle(int handle) {
+ protected EGLObjectHandle(int handle) {
mHandle = handle;
}
+ /**
+ * Returns the native handle of the wrapped EGL object. This handle can be
+ * cast to the corresponding native type on the native side.
+ *
+ * For example, EGLDisplay dpy = (EGLDisplay)handle;
+ *
+ * @return the native handle of the wrapped EGL object.
+ */
public int getHandle() {
return mHandle;
}
+
+ @Override
+ public int hashCode() {
+ return getHandle();
+ }
}