summaryrefslogtreecommitdiffstats
path: root/core/jni/android/graphics/SurfaceTexture.cpp
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2011-03-17 15:52:34 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-03-17 15:52:34 -0700
commitce06ebfda4bd7c511cef3d98aacf7291a743ea46 (patch)
tree6d302b8230f6d9b97166fd1b6edc92878f6eb949 /core/jni/android/graphics/SurfaceTexture.cpp
parent6764ba4482129e70d33fe0a7ff2579654b5da87a (diff)
parentc5f94d8a4779050125145396ca83fbc862c7ed6b (diff)
downloadframeworks_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.cpp9
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)