Merge "Make SurfaceTexture#isReleased public API" into oc-dev

This commit is contained in:
Chris Craik
2017-04-28 17:09:51 +00:00
committed by Android (Google) Code Review
4 changed files with 10 additions and 5 deletions

View File

@@ -13762,6 +13762,7 @@ package android.graphics {
method public void detachFromGLContext();
method public long getTimestamp();
method public void getTransformMatrix(float[]);
method public boolean isReleased();
method public void release();
method public void releaseTexImage();
method public void setDefaultBufferSize(int, int);

View File

@@ -14540,6 +14540,7 @@ package android.graphics {
method public void detachFromGLContext();
method public long getTimestamp();
method public void getTransformMatrix(float[]);
method public boolean isReleased();
method public void release();
method public void releaseTexImage();
method public void setDefaultBufferSize(int, int);

View File

@@ -13804,6 +13804,7 @@ package android.graphics {
method public void detachFromGLContext();
method public long getTimestamp();
method public void getTransformMatrix(float[]);
method public boolean isReleased();
method public void release();
method public void releaseTexImage();
method public void setDefaultBufferSize(int, int);

View File

@@ -16,14 +16,14 @@
package android.graphics;
import java.lang.ref.WeakReference;
import android.annotation.Nullable;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.view.Surface;
import java.lang.ref.WeakReference;
/**
* Captures frames from an image stream as an OpenGL ES texture.
*
@@ -345,14 +345,17 @@ public class SurfaceTexture {
* Always call this method when you are done with SurfaceTexture. Failing
* to do so may delay resource deallocation for a significant amount of
* time.
*
* @see #isReleased()
*/
public void release() {
nativeRelease();
}
/**
* Returns true if the SurfaceTexture was released
* @hide
* Returns true if the SurfaceTexture was released.
*
* @see #release()
*/
public boolean isReleased() {
return nativeIsReleased();
@@ -400,7 +403,6 @@ public class SurfaceTexture {
private native void nativeReleaseTexImage();
private native int nativeDetachFromGLContext();
private native int nativeAttachToGLContext(int texName);
private native int nativeGetQueuedCount();
private native void nativeRelease();
private native boolean nativeIsReleased();
}