diff options
author | Mathias Agopian <mathias@google.com> | 2011-08-03 18:12:36 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-08-03 18:12:36 -0700 |
commit | 452f035c31620499563dc9135926f9a6b4d15cae (patch) | |
tree | 8931881be9f080761ad3283286f9a5ce1b73a507 /core/jni | |
parent | a164690a3417c81ee55890079fa75432db82bfdd (diff) | |
parent | ec46b4e1ca89d7c3a9ad70ded58da08b5e19f08f (diff) | |
download | frameworks_base-452f035c31620499563dc9135926f9a6b4d15cae.zip frameworks_base-452f035c31620499563dc9135926f9a6b4d15cae.tar.gz frameworks_base-452f035c31620499563dc9135926f9a6b4d15cae.tar.bz2 |
Merge changes I689cb0c0,I09603218
* changes:
Add a 'release' method to the SurfaceTexture public Java API
Mark Window-Manager-specific APIs on android.view.Surface as @hide
Diffstat (limited to 'core/jni')
-rw-r--r-- | core/jni/android/graphics/SurfaceTexture.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/jni/android/graphics/SurfaceTexture.cpp b/core/jni/android/graphics/SurfaceTexture.cpp index 2de0932..ffcd1a0 100644 --- a/core/jni/android/graphics/SurfaceTexture.cpp +++ b/core/jni/android/graphics/SurfaceTexture.cpp @@ -233,6 +233,12 @@ static jlong SurfaceTexture_getTimestamp(JNIEnv* env, jobject thiz) return surfaceTexture->getTimestamp(); } +static void SurfaceTexture_release(JNIEnv* env, jobject thiz) +{ + sp<SurfaceTexture> surfaceTexture(SurfaceTexture_getSurfaceTexture(env, thiz)); + surfaceTexture->abandon(); +} + // ---------------------------------------------------------------------------- static JNINativeMethod gSurfaceTextureMethods[] = { @@ -243,6 +249,7 @@ static JNINativeMethod gSurfaceTextureMethods[] = { {"nativeUpdateTexImage", "()V", (void*)SurfaceTexture_updateTexImage }, {"nativeGetTransformMatrix", "([F)V", (void*)SurfaceTexture_getTransformMatrix }, {"nativeGetTimestamp", "()J", (void*)SurfaceTexture_getTimestamp }, + {"nativeRelease", "()V", (void*)SurfaceTexture_release }, }; int register_android_graphics_SurfaceTexture(JNIEnv* env) |