summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorThomas Tafertshofer <tafertth@google.com>2012-07-12 15:58:07 -0700
committerThomas Tafertshofer <tafertth@google.com>2012-07-13 17:44:00 -0700
commit9b18b515909354d7b48c8ebc33ec38e2c6bbdf37 (patch)
treedeba4a28ee5731ba310b795c4f93db1d66017f52 /opengl
parentf16336790bca9d3e946553f2e5a16e14bb9dbc3e (diff)
downloadframeworks_base-9b18b515909354d7b48c8ebc33ec38e2c6bbdf37.zip
frameworks_base-9b18b515909354d7b48c8ebc33ec38e2c6bbdf37.tar.gz
frameworks_base-9b18b515909354d7b48c8ebc33ec38e2c6bbdf37.tar.bz2
EGL 1.4 API without @hide
Change-Id: If03d23082b011aaba41594712601495dcbd70f6a
Diffstat (limited to 'opengl')
-rw-r--r--opengl/java/android/opengl/EGL14.java68
-rw-r--r--opengl/java/android/opengl/EGLConfig.java10
-rw-r--r--opengl/java/android/opengl/EGLContext.java10
-rw-r--r--opengl/java/android/opengl/EGLDisplay.java10
-rw-r--r--opengl/java/android/opengl/EGLObjectHandle.java18
-rw-r--r--opengl/java/android/opengl/EGLSurface.java10
6 files changed, 62 insertions, 64 deletions
diff --git a/opengl/java/android/opengl/EGL14.java b/opengl/java/android/opengl/EGL14.java
index 31fc04a..4cdc272 100644
--- a/opengl/java/android/opengl/EGL14.java
+++ b/opengl/java/android/opengl/EGL14.java
@@ -24,10 +24,10 @@ import android.view.Surface;
import android.view.SurfaceView;
import android.view.SurfaceHolder;
-
/**
-* @hide
-*/
+ * EGL 1.4
+ *
+ */
public class EGL14 {
public static final int EGL_DEFAULT_DISPLAY = 0;
@@ -150,18 +150,18 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
static {
_nativeClassInit();
}
- /* @hide C function EGLint eglGetError ( void ) */
+ // C function EGLint eglGetError ( void )
public static native int eglGetError(
);
- /* @hide C function EGLDisplay eglGetDisplay ( EGLNativeDisplayType display_id ) */
+ // C function EGLDisplay eglGetDisplay ( EGLNativeDisplayType display_id )
public static native EGLDisplay eglGetDisplay(
int display_id
);
- /* @hide C function EGLBoolean eglInitialize ( EGLDisplay dpy, EGLint *major, EGLint *minor ) */
+ // C function EGLBoolean eglInitialize ( EGLDisplay dpy, EGLint *major, EGLint *minor )
public static native boolean eglInitialize(
EGLDisplay dpy,
@@ -171,7 +171,7 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
int minorOffset
);
- /* @hide C function EGLBoolean eglTerminate ( EGLDisplay dpy ) */
+ // C function EGLBoolean eglTerminate ( EGLDisplay dpy )
public static native boolean eglTerminate(
EGLDisplay dpy
@@ -183,7 +183,7 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
EGLDisplay dpy,
int name
);
- /* @hide C function EGLBoolean eglGetConfigs ( EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config ) */
+ // C function EGLBoolean eglGetConfigs ( EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config )
public static native boolean eglGetConfigs(
EGLDisplay dpy,
@@ -194,7 +194,7 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
int num_configOffset
);
- /* @hide C function EGLBoolean eglChooseConfig ( EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config ) */
+ // C function EGLBoolean eglChooseConfig ( EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config )
public static native boolean eglChooseConfig(
EGLDisplay dpy,
@@ -207,7 +207,7 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
int num_configOffset
);
- /* @hide C function EGLBoolean eglGetConfigAttrib ( EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value ) */
+ // C function EGLBoolean eglGetConfigAttrib ( EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value )
public static native boolean eglGetConfigAttrib(
EGLDisplay dpy,
@@ -265,7 +265,7 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
return surface;
}
- /* @hide C function EGLSurface eglCreatePbufferSurface ( EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list ) */
+ // C function EGLSurface eglCreatePbufferSurface ( EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list )
public static native EGLSurface eglCreatePbufferSurface(
EGLDisplay dpy,
@@ -274,7 +274,7 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
int offset
);
- /* @hide C function EGLSurface eglCreatePixmapSurface ( EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list ) */
+ // C function EGLSurface eglCreatePixmapSurface ( EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list )
public static native EGLSurface eglCreatePixmapSurface(
EGLDisplay dpy,
@@ -284,14 +284,14 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
int offset
);
- /* @hide C function EGLBoolean eglDestroySurface ( EGLDisplay dpy, EGLSurface surface ) */
+ // C function EGLBoolean eglDestroySurface ( EGLDisplay dpy, EGLSurface surface )
public static native boolean eglDestroySurface(
EGLDisplay dpy,
EGLSurface surface
);
- /* @hide C function EGLBoolean eglQuerySurface ( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value ) */
+ // C function EGLBoolean eglQuerySurface ( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value )
public static native boolean eglQuerySurface(
EGLDisplay dpy,
@@ -301,28 +301,28 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
int offset
);
- /* @hide C function EGLBoolean eglBindAPI ( EGLenum api ) */
+ // C function EGLBoolean eglBindAPI ( EGLenum api )
public static native boolean eglBindAPI(
int api
);
- /* @hide C function EGLenum eglQueryAPI ( void ) */
+ // C function EGLenum eglQueryAPI ( void )
public static native int eglQueryAPI(
);
- /* @hide C function EGLBoolean eglWaitClient ( void ) */
+ // C function EGLBoolean eglWaitClient ( void )
public static native boolean eglWaitClient(
);
- /* @hide C function EGLBoolean eglReleaseThread ( void ) */
+ // C function EGLBoolean eglReleaseThread ( void )
public static native boolean eglReleaseThread(
);
- /* @hide C function EGLSurface eglCreatePbufferFromClientBuffer ( EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list ) */
+ // C function EGLSurface eglCreatePbufferFromClientBuffer ( EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list )
public static native EGLSurface eglCreatePbufferFromClientBuffer(
EGLDisplay dpy,
@@ -333,7 +333,7 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
int offset
);
- /* @hide C function EGLBoolean eglSurfaceAttrib ( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value ) */
+ // C function EGLBoolean eglSurfaceAttrib ( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value )
public static native boolean eglSurfaceAttrib(
EGLDisplay dpy,
@@ -342,7 +342,7 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
int value
);
- /* @hide C function EGLBoolean eglBindTexImage ( EGLDisplay dpy, EGLSurface surface, EGLint buffer ) */
+ // C function EGLBoolean eglBindTexImage ( EGLDisplay dpy, EGLSurface surface, EGLint buffer )
public static native boolean eglBindTexImage(
EGLDisplay dpy,
@@ -350,7 +350,7 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
int buffer
);
- /* @hide C function EGLBoolean eglReleaseTexImage ( EGLDisplay dpy, EGLSurface surface, EGLint buffer ) */
+ // C function EGLBoolean eglReleaseTexImage ( EGLDisplay dpy, EGLSurface surface, EGLint buffer )
public static native boolean eglReleaseTexImage(
EGLDisplay dpy,
@@ -358,14 +358,14 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
int buffer
);
- /* @hide C function EGLBoolean eglSwapInterval ( EGLDisplay dpy, EGLint interval ) */
+ // C function EGLBoolean eglSwapInterval ( EGLDisplay dpy, EGLint interval )
public static native boolean eglSwapInterval(
EGLDisplay dpy,
int interval
);
- /* @hide C function EGLContext eglCreateContext ( EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list ) */
+ // C function EGLContext eglCreateContext ( EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list )
public static native EGLContext eglCreateContext(
EGLDisplay dpy,
@@ -375,14 +375,14 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
int offset
);
- /* @hide C function EGLBoolean eglDestroyContext ( EGLDisplay dpy, EGLContext ctx ) */
+ // C function EGLBoolean eglDestroyContext ( EGLDisplay dpy, EGLContext ctx )
public static native boolean eglDestroyContext(
EGLDisplay dpy,
EGLContext ctx
);
- /* @hide C function EGLBoolean eglMakeCurrent ( EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx ) */
+ // C function EGLBoolean eglMakeCurrent ( EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx )
public static native boolean eglMakeCurrent(
EGLDisplay dpy,
@@ -391,23 +391,23 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
EGLContext ctx
);
- /* @hide C function EGLContext eglGetCurrentContext ( void ) */
+ // C function EGLContext eglGetCurrentContext ( void )
public static native EGLContext eglGetCurrentContext(
);
- /* @hide C function EGLSurface eglGetCurrentSurface ( EGLint readdraw ) */
+ // C function EGLSurface eglGetCurrentSurface ( EGLint readdraw )
public static native EGLSurface eglGetCurrentSurface(
int readdraw
);
- /* @hide C function EGLDisplay eglGetCurrentDisplay ( void ) */
+ // C function EGLDisplay eglGetCurrentDisplay ( void )
public static native EGLDisplay eglGetCurrentDisplay(
);
- /* @hide C function EGLBoolean eglQueryContext ( EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value ) */
+ // C function EGLBoolean eglQueryContext ( EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value )
public static native boolean eglQueryContext(
EGLDisplay dpy,
@@ -417,25 +417,25 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
int offset
);
- /* @hide C function EGLBoolean eglWaitGL ( void ) */
+ // C function EGLBoolean eglWaitGL ( void )
public static native boolean eglWaitGL(
);
- /* @hide C function EGLBoolean eglWaitNative ( EGLint engine ) */
+ // C function EGLBoolean eglWaitNative ( EGLint engine )
public static native boolean eglWaitNative(
int engine
);
- /* @hide C function EGLBoolean eglSwapBuffers ( EGLDisplay dpy, EGLSurface surface ) */
+ // C function EGLBoolean eglSwapBuffers ( EGLDisplay dpy, EGLSurface surface )
public static native boolean eglSwapBuffers(
EGLDisplay dpy,
EGLSurface surface
);
- /* @hide C function EGLBoolean eglCopyBuffers ( EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target ) */
+ // C function EGLBoolean eglCopyBuffers ( EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target )
public static native boolean eglCopyBuffers(
EGLDisplay dpy,
diff --git a/opengl/java/android/opengl/EGLConfig.java b/opengl/java/android/opengl/EGLConfig.java
index d9aebfc..d457c9f 100644
--- a/opengl/java/android/opengl/EGLConfig.java
+++ b/opengl/java/android/opengl/EGLConfig.java
@@ -18,10 +18,11 @@
package android.opengl;
/**
- * @hide
+ * Wrapper class for native EGLConfig objects.
+ *
*/
public class EGLConfig extends EGLObjectHandle {
- public EGLConfig(int handle) {
+ private EGLConfig(int handle) {
super(handle);
}
@@ -33,9 +34,4 @@ public class EGLConfig extends EGLObjectHandle {
EGLConfig that = (EGLConfig) o;
return getHandle() == that.getHandle();
}
-
- @Override
- public int hashCode() {
- return getHandle();
- }
}
diff --git a/opengl/java/android/opengl/EGLContext.java b/opengl/java/android/opengl/EGLContext.java
index 7b194f3..41b8ef1 100644
--- a/opengl/java/android/opengl/EGLContext.java
+++ b/opengl/java/android/opengl/EGLContext.java
@@ -18,10 +18,11 @@
package android.opengl;
/**
- * @hide
+ * Wrapper class for native EGLContext objects.
+ *
*/
public class EGLContext extends EGLObjectHandle {
- public EGLContext(int handle) {
+ private EGLContext(int handle) {
super(handle);
}
@@ -33,9 +34,4 @@ public class EGLContext extends EGLObjectHandle {
EGLContext that = (EGLContext) o;
return getHandle() == that.getHandle();
}
-
- @Override
- public int hashCode() {
- return getHandle();
- }
}
diff --git a/opengl/java/android/opengl/EGLDisplay.java b/opengl/java/android/opengl/EGLDisplay.java
index a090cf0..17d1a64 100644
--- a/opengl/java/android/opengl/EGLDisplay.java
+++ b/opengl/java/android/opengl/EGLDisplay.java
@@ -18,10 +18,11 @@
package android.opengl;
/**
- * @hide
+ * Wrapper class for native EGLDisplay objects.
+ *
*/
public class EGLDisplay extends EGLObjectHandle {
- public EGLDisplay(int handle) {
+ private EGLDisplay(int handle) {
super(handle);
}
@@ -33,9 +34,4 @@ public class EGLDisplay extends EGLObjectHandle {
EGLDisplay that = (EGLDisplay) o;
return getHandle() == that.getHandle();
}
-
- @Override
- public int hashCode() {
- return getHandle();
- }
}
diff --git a/opengl/java/android/opengl/EGLObjectHandle.java b/opengl/java/android/opengl/EGLObjectHandle.java
index 01f9bd4..d2710de 100644
--- a/opengl/java/android/opengl/EGLObjectHandle.java
+++ b/opengl/java/android/opengl/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();
+ }
}
diff --git a/opengl/java/android/opengl/EGLSurface.java b/opengl/java/android/opengl/EGLSurface.java
index 4800a64..65bec4f 100644
--- a/opengl/java/android/opengl/EGLSurface.java
+++ b/opengl/java/android/opengl/EGLSurface.java
@@ -18,10 +18,11 @@
package android.opengl;
/**
- * @hide
+ * Wrapper class for native EGLSurface objects.
+ *
*/
public class EGLSurface extends EGLObjectHandle {
- public EGLSurface(int handle) {
+ private EGLSurface(int handle) {
super(handle);
}
@@ -33,9 +34,4 @@ public class EGLSurface extends EGLObjectHandle {
EGLSurface that = (EGLSurface) o;
return getHandle() == that.getHandle();
}
-
- @Override
- public int hashCode() {
- return getHandle();
- }
}