summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2011-01-13 11:29:14 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-01-13 11:29:14 -0800
commit9aba2324ac8d7216732b42346bfcaf0be71eb22e (patch)
tree56f1ca9d1e4d31822638aee68206064788504760 /core/jni
parent39d80c3846972e6204dfd956263a3fb6a799444d (diff)
parentb0ba48c95ea8768a051100c5adb4c906caa1e080 (diff)
downloadframeworks_base-9aba2324ac8d7216732b42346bfcaf0be71eb22e.zip
frameworks_base-9aba2324ac8d7216732b42346bfcaf0be71eb22e.tar.gz
frameworks_base-9aba2324ac8d7216732b42346bfcaf0be71eb22e.tar.bz2
Merge "Add getTransformMatrix to the SurfaceTexture API." into honeycomb
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android/graphics/SurfaceTexture.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/jni/android/graphics/SurfaceTexture.cpp b/core/jni/android/graphics/SurfaceTexture.cpp
index 2645045..c1229f3 100644
--- a/core/jni/android/graphics/SurfaceTexture.cpp
+++ b/core/jni/android/graphics/SurfaceTexture.cpp
@@ -82,6 +82,15 @@ static void SurfaceTexture_updateTexImage(JNIEnv* env, jobject clazz)
surfaceTexture->updateTexImage();
}
+static void SurfaceTexture_getTransformMatrix(JNIEnv* env, jobject clazz,
+ jfloatArray jmtx)
+{
+ sp<SurfaceTexture> surfaceTexture(getSurfaceTexture(env, clazz));
+ float* mtx = env->GetFloatArrayElements(jmtx, NULL);
+ surfaceTexture->getTransformMatrix(mtx);
+ env->ReleaseFloatArrayElements(jmtx, mtx, 0);
+}
+
// ----------------------------------------------------------------------------
const char* const kSurfaceTextureClassPathName = "android/graphics/SurfaceTexture";
@@ -91,6 +100,7 @@ static JNINativeMethod gSurfaceTextureMethods[] = {
{"nativeClassInit", "()V", (void*)nativeClassInit },
{"init", "(I)V", (void*)SurfaceTexture_init },
{"updateTexImage", "()V", (void*)SurfaceTexture_updateTexImage },
+ {"getTransformMatrixImpl", "([F)V", (void*)SurfaceTexture_getTransformMatrix },
};
static void nativeClassInit(JNIEnv* env, jclass clazz)