diff options
author | Jamie Gennis <jgennis@google.com> | 2011-06-23 13:02:40 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-06-23 13:02:40 -0700 |
commit | b950b8e23e18cbe23069b791bca93c8cfbbab5ce (patch) | |
tree | 2d916950915f40a4b067f2f9415b0b2762cd232a /core | |
parent | 58b868417755805ebdfe4feb65664ad98c00bf35 (diff) | |
parent | 925bcaabde5a21687b51caa7ab329310a819f068 (diff) | |
download | frameworks_base-b950b8e23e18cbe23069b791bca93c8cfbbab5ce.zip frameworks_base-b950b8e23e18cbe23069b791bca93c8cfbbab5ce.tar.gz frameworks_base-b950b8e23e18cbe23069b791bca93c8cfbbab5ce.tar.bz2 |
Merge "Fix the issue where onFrameAvailable is not triggered if SurfaceTexture is in sync mode."
Diffstat (limited to 'core')
-rw-r--r-- | core/jni/android/graphics/SurfaceTexture.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/jni/android/graphics/SurfaceTexture.cpp b/core/jni/android/graphics/SurfaceTexture.cpp index 0d28cb1..a8cb6f7 100644 --- a/core/jni/android/graphics/SurfaceTexture.cpp +++ b/core/jni/android/graphics/SurfaceTexture.cpp @@ -212,6 +212,12 @@ static jlong SurfaceTexture_getTimestamp(JNIEnv* env, jobject thiz) return surfaceTexture->getTimestamp(); } +static jint SurfaceTexture_getQueuedCount(JNIEnv* env, jobject thiz) +{ + sp<SurfaceTexture> surfaceTexture(SurfaceTexture_getSurfaceTexture(env, thiz)); + return surfaceTexture->getQueuedCount(); +} + // ---------------------------------------------------------------------------- static JNINativeMethod gSurfaceTextureMethods[] = { @@ -221,7 +227,8 @@ static JNINativeMethod gSurfaceTextureMethods[] = { {"nativeSetDefaultBufferSize", "(II)V", (void*)SurfaceTexture_setDefaultBufferSize }, {"nativeUpdateTexImage", "()V", (void*)SurfaceTexture_updateTexImage }, {"nativeGetTransformMatrix", "([F)V", (void*)SurfaceTexture_getTransformMatrix }, - {"nativeGetTimestamp", "()J", (void*)SurfaceTexture_getTimestamp } + {"nativeGetTimestamp", "()J", (void*)SurfaceTexture_getTimestamp }, + {"nativeGetQueuedCount", "()I", (void*)SurfaceTexture_getQueuedCount } }; int register_android_graphics_SurfaceTexture(JNIEnv* env) |