Loading opengl/tools/glgen/src/JType.java +2 −2 Original line number Diff line number Diff line Loading @@ -57,8 +57,8 @@ public class JType { typeMapping.put(new CType("EGLenum"), new JType("int")); typeMapping.put(new CType("EGLNativePixmapType"), new JType("int")); typeMapping.put(new CType("EGLNativeWindowType"), new JType("int")); typeMapping.put(new CType("EGLNativeDisplayType"), new JType("int")); typeMapping.put(new CType("EGLClientBuffer"), new JType("int")); typeMapping.put(new CType("EGLNativeDisplayType"), new JType("long")); typeMapping.put(new CType("EGLClientBuffer"), new JType("long")); typeMapping.put(new CType("EGLnsecsANDROID"), new JType("long")); // EGL nonprimitive types Loading opengl/tools/glgen/static/egl/EGLConfig.java +2 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ package android.opengl; * */ public class EGLConfig extends EGLObjectHandle { private EGLConfig(int handle) { private EGLConfig(long handle) { super(handle); } Loading @@ -32,6 +32,6 @@ public class EGLConfig extends EGLObjectHandle { if (!(o instanceof EGLConfig)) return false; EGLConfig that = (EGLConfig) o; return getHandle() == that.getHandle(); return getNativeHandle() == that.getNativeHandle(); } } opengl/tools/glgen/static/egl/EGLContext.java +2 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ package android.opengl; * */ public class EGLContext extends EGLObjectHandle { private EGLContext(int handle) { private EGLContext(long handle) { super(handle); } Loading @@ -32,6 +32,6 @@ public class EGLContext extends EGLObjectHandle { if (!(o instanceof EGLContext)) return false; EGLContext that = (EGLContext) o; return getHandle() == that.getHandle(); return getNativeHandle() == that.getNativeHandle(); } } opengl/tools/glgen/static/egl/EGLDisplay.java +2 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ package android.opengl; * */ public class EGLDisplay extends EGLObjectHandle { private EGLDisplay(int handle) { private EGLDisplay(long handle) { super(handle); } Loading @@ -32,6 +32,6 @@ public class EGLDisplay extends EGLObjectHandle { if (!(o instanceof EGLDisplay)) return false; EGLDisplay that = (EGLDisplay) o; return getHandle() == that.getHandle(); return getNativeHandle() == that.getNativeHandle(); } } opengl/tools/glgen/static/egl/EGLObjectHandle.java +28 −4 Original line number Diff line number Diff line Loading @@ -22,12 +22,20 @@ package android.opengl; * */ public abstract class EGLObjectHandle { private final int mHandle; private final long mHandle; // TODO Deprecate EGLObjectHandle(int) method protected EGLObjectHandle(int handle) { mHandle = handle; } // TODO Unhide the EGLObjectHandle(long) method /** * {@hide} */ protected EGLObjectHandle(long handle) { mHandle = handle; } // TODO Deprecate getHandle() method in favor of getNativeHandle() /** * Returns the native handle of the wrapped EGL object. This handle can be * cast to the corresponding native type on the native side. Loading @@ -37,11 +45,27 @@ public abstract class EGLObjectHandle { * @return the native handle of the wrapped EGL object. */ public int getHandle() { return mHandle; if ((mHandle & 0xffffffffL) != mHandle) { throw new UnsupportedOperationException(); } return (int)mHandle; } // TODO Unhide getNativeHandle() method /** * {@hide} */ public long getNativeHandle() { return mHandle; } @Override public int hashCode() { return getHandle(); /* * Based on the algorithm suggested in * http://developer.android.com/reference/java/lang/Object.html */ int result = 17; result = 31 * result + (int) (mHandle ^ (mHandle >>> 32)); return result; } } Loading
opengl/tools/glgen/src/JType.java +2 −2 Original line number Diff line number Diff line Loading @@ -57,8 +57,8 @@ public class JType { typeMapping.put(new CType("EGLenum"), new JType("int")); typeMapping.put(new CType("EGLNativePixmapType"), new JType("int")); typeMapping.put(new CType("EGLNativeWindowType"), new JType("int")); typeMapping.put(new CType("EGLNativeDisplayType"), new JType("int")); typeMapping.put(new CType("EGLClientBuffer"), new JType("int")); typeMapping.put(new CType("EGLNativeDisplayType"), new JType("long")); typeMapping.put(new CType("EGLClientBuffer"), new JType("long")); typeMapping.put(new CType("EGLnsecsANDROID"), new JType("long")); // EGL nonprimitive types Loading
opengl/tools/glgen/static/egl/EGLConfig.java +2 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ package android.opengl; * */ public class EGLConfig extends EGLObjectHandle { private EGLConfig(int handle) { private EGLConfig(long handle) { super(handle); } Loading @@ -32,6 +32,6 @@ public class EGLConfig extends EGLObjectHandle { if (!(o instanceof EGLConfig)) return false; EGLConfig that = (EGLConfig) o; return getHandle() == that.getHandle(); return getNativeHandle() == that.getNativeHandle(); } }
opengl/tools/glgen/static/egl/EGLContext.java +2 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ package android.opengl; * */ public class EGLContext extends EGLObjectHandle { private EGLContext(int handle) { private EGLContext(long handle) { super(handle); } Loading @@ -32,6 +32,6 @@ public class EGLContext extends EGLObjectHandle { if (!(o instanceof EGLContext)) return false; EGLContext that = (EGLContext) o; return getHandle() == that.getHandle(); return getNativeHandle() == that.getNativeHandle(); } }
opengl/tools/glgen/static/egl/EGLDisplay.java +2 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ package android.opengl; * */ public class EGLDisplay extends EGLObjectHandle { private EGLDisplay(int handle) { private EGLDisplay(long handle) { super(handle); } Loading @@ -32,6 +32,6 @@ public class EGLDisplay extends EGLObjectHandle { if (!(o instanceof EGLDisplay)) return false; EGLDisplay that = (EGLDisplay) o; return getHandle() == that.getHandle(); return getNativeHandle() == that.getNativeHandle(); } }
opengl/tools/glgen/static/egl/EGLObjectHandle.java +28 −4 Original line number Diff line number Diff line Loading @@ -22,12 +22,20 @@ package android.opengl; * */ public abstract class EGLObjectHandle { private final int mHandle; private final long mHandle; // TODO Deprecate EGLObjectHandle(int) method protected EGLObjectHandle(int handle) { mHandle = handle; } // TODO Unhide the EGLObjectHandle(long) method /** * {@hide} */ protected EGLObjectHandle(long handle) { mHandle = handle; } // TODO Deprecate getHandle() method in favor of getNativeHandle() /** * Returns the native handle of the wrapped EGL object. This handle can be * cast to the corresponding native type on the native side. Loading @@ -37,11 +45,27 @@ public abstract class EGLObjectHandle { * @return the native handle of the wrapped EGL object. */ public int getHandle() { return mHandle; if ((mHandle & 0xffffffffL) != mHandle) { throw new UnsupportedOperationException(); } return (int)mHandle; } // TODO Unhide getNativeHandle() method /** * {@hide} */ public long getNativeHandle() { return mHandle; } @Override public int hashCode() { return getHandle(); /* * Based on the algorithm suggested in * http://developer.android.com/reference/java/lang/Object.html */ int result = 17; result = 31 * result + (int) (mHandle ^ (mHandle >>> 32)); return result; } }