diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2011-03-17 15:52:34 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-03-17 15:52:34 -0700 |
commit | ce06ebfda4bd7c511cef3d98aacf7291a743ea46 (patch) | |
tree | 6d302b8230f6d9b97166fd1b6edc92878f6eb949 /core/jni/android/graphics/SurfaceTexture.cpp | |
parent | 6764ba4482129e70d33fe0a7ff2579654b5da87a (diff) | |
parent | c5f94d8a4779050125145396ca83fbc862c7ed6b (diff) | |
download | frameworks_base-ce06ebfda4bd7c511cef3d98aacf7291a743ea46.zip frameworks_base-ce06ebfda4bd7c511cef3d98aacf7291a743ea46.tar.gz frameworks_base-ce06ebfda4bd7c511cef3d98aacf7291a743ea46.tar.bz2 |
Merge "Add support for timestamps into SurfaceTexture."
Diffstat (limited to 'core/jni/android/graphics/SurfaceTexture.cpp')
-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 c4e5878..2f70190 100644 --- a/core/jni/android/graphics/SurfaceTexture.cpp +++ b/core/jni/android/graphics/SurfaceTexture.cpp @@ -171,6 +171,12 @@ static void SurfaceTexture_getTransformMatrix(JNIEnv* env, jobject thiz, env->ReleaseFloatArrayElements(jmtx, mtx, 0); } +static jlong SurfaceTexture_getTimestamp(JNIEnv* env, jobject thiz) +{ + sp<SurfaceTexture> surfaceTexture(SurfaceTexture_getSurfaceTexture(env, thiz)); + return surfaceTexture->getTimestamp(); +} + // ---------------------------------------------------------------------------- const char* const kSurfaceTextureClassPathName = "android/graphics/SurfaceTexture"; @@ -178,9 +184,10 @@ const char* const kSurfaceTextureClassPathName = "android/graphics/SurfaceTextur static JNINativeMethod gSurfaceTextureMethods[] = { {"nativeClassInit", "()V", (void*)SurfaceTexture_classInit }, {"nativeInit", "(ILjava/lang/Object;)V", (void*)SurfaceTexture_init }, - {"nativeFinalize", "()V", (void*)SurfaceTexture_finalize }, + {"nativeFinalize", "()V", (void*)SurfaceTexture_finalize }, {"nativeUpdateTexImage", "()V", (void*)SurfaceTexture_updateTexImage }, {"nativeGetTransformMatrix", "([F)V", (void*)SurfaceTexture_getTransformMatrix }, + {"nativeGetTimestamp", "()J", (void*)SurfaceTexture_getTimestamp } }; int register_android_graphics_SurfaceTexture(JNIEnv* env) |