API changes for 64 bit platforms.

EGLObjectHandle.<init>(int) and int EGLObjectHandle.getHandle()
have now been deprecated and replaced with variants that take
and return java longs.

bug: 13181704
Change-Id: Ie88e591c288d6de5655364b4cd673f61cce68d7d
This commit is contained in:
Narayan Kamath 2014-02-27 14:12:55 +00:00
parent 2c95c57b62
commit a90086a914

View File

@ -24,18 +24,28 @@ package android.opengl;
public abstract class EGLObjectHandle {
private final long mHandle;
// TODO Deprecate EGLObjectHandle(int) method
/**
* @deprecated Use {@link EGLObjectHandle(long)} instead. Handles
* on 64 bit platforms will be wider than java ints.
*/
@Deprecated
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()
/**
* @deprecated Use {@link #getNativeHandle()} instead. Handles on
* 64 bit platforms will be wider than java ints.
*/
@Deprecated
public int getHandle() {
if ((mHandle & 0xffffffffL) != mHandle) {
throw new UnsupportedOperationException();
}
return (int)mHandle;
}
/**
* Returns the native handle of the wrapped EGL object. This handle can be
* cast to the corresponding native type on the native side.
@ -44,17 +54,6 @@ public abstract class EGLObjectHandle {
*
* @return the native handle of the wrapped EGL object.
*/
public int getHandle() {
if ((mHandle & 0xffffffffL) != mHandle) {
throw new UnsupportedOperationException();
}
return (int)mHandle;
}
// TODO Unhide getNativeHandle() method
/**
* {@hide}
*/
public long getNativeHandle() {
return mHandle;
}