summaryrefslogtreecommitdiff
path: root/graphics/jni
diff options
context:
space:
mode:
authorJason Sams <jsams@google.com>2012-03-23 11:47:26 -0700
committerJason Sams <jsams@google.com>2012-03-23 11:47:26 -0700
commitfe1d5ffd1b6c4977a9f301997d2ad90e5b049a3b (patch)
tree7a3135d31e4415a4b6b31c7e44ad15cfa1ccc86f /graphics/jni
parent3da5525558ad84757c48907eead66f44f0f5dd32 (diff)
downloadbase-fe1d5ffd1b6c4977a9f301997d2ad90e5b049a3b.tar.gz
Implement USAGE_IO_INPUT
Change-Id: Idbf7bb21f5ab673ad77082c5c19921d2b276c04b
Diffstat (limited to 'graphics/jni')
-rw-r--r--graphics/jni/android_renderscript_RenderScript.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index 9fc4fd4ba68f..9d4c64f27674 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -477,6 +477,15 @@ nAllocationGetSurfaceTextureID(JNIEnv *_env, jobject _this, RsContext con, jint
}
static void
+nAllocationGetSurfaceTextureID2(JNIEnv *_env, jobject _this, RsContext con, jint a, jobject jst)
+{
+ LOG_API("nAllocationGetSurfaceTextureID2, con(%p), a(%p)", con, (RsAllocation)a);
+ sp<SurfaceTexture> st = SurfaceTexture_getSurfaceTexture(_env, jst);
+
+ rsAllocationGetSurfaceTextureID2(con, (RsAllocation)a, st.get(), sizeof(SurfaceTexture *));
+}
+
+static void
nAllocationSetSurfaceTexture(JNIEnv *_env, jobject _this, RsContext con,
RsAllocation alloc, jobject sur)
{
@@ -1352,7 +1361,8 @@ static JNINativeMethod methods[] = {
{"rsnAllocationSyncAll", "(III)V", (void*)nAllocationSyncAll },
{"rsnAllocationGetSurfaceTextureID", "(II)I", (void*)nAllocationGetSurfaceTextureID },
-{"rsnAllocationSetSurfaceTexture", "(IILandroid/graphics/SurfaceTexture;)V", (void*)nAllocationSetSurfaceTexture },
+{"rsnAllocationGetSurfaceTextureID2","(IILandroid/graphics/SurfaceTexture;)V",(void*)nAllocationGetSurfaceTextureID2 },
+{"rsnAllocationSetSurfaceTexture", "(IILandroid/graphics/SurfaceTexture;)V",(void*)nAllocationSetSurfaceTexture },
{"rsnAllocationIoSend", "(II)V", (void*)nAllocationIoSend },
{"rsnAllocationIoReceive", "(II)V", (void*)nAllocationIoReceive },
{"rsnAllocationData1D", "(IIIII[II)V", (void*)nAllocationData1D_i },