diff options
author | Jason Sams <rjsams@android.com> | 2010-10-05 13:32:49 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2010-10-05 13:32:49 -0700 |
commit | 5edc608a0749ed4b7074b5c1243043eb722c3c31 (patch) | |
tree | 6a9bb5e4d9a93cac9360b3c87647403818eebd10 /graphics/jni | |
parent | 2a2a38db16f3aff962ca17bac18d5c5379b25172 (diff) | |
download | frameworks_base-5edc608a0749ed4b7074b5c1243043eb722c3c31.zip frameworks_base-5edc608a0749ed4b7074b5c1243043eb722c3c31.tar.gz frameworks_base-5edc608a0749ed4b7074b5c1243043eb722c3c31.tar.bz2 |
Implement allocation resizing.
Change-Id: Ie38d42419d595cec730a8721cc1321c5edb6b4d6
Diffstat (limited to 'graphics/jni')
-rw-r--r-- | graphics/jni/android_renderscript_RenderScript.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp index 67a2b63..8f1e93c 100644 --- a/graphics/jni/android_renderscript_RenderScript.cpp +++ b/graphics/jni/android_renderscript_RenderScript.cpp @@ -587,6 +587,20 @@ nAllocationGetType(JNIEnv *_env, jobject _this, RsContext con, jint a) return (jint) rsAllocationGetType(con, (RsAllocation)a); } +static void +nAllocationResize1D(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jint dimX) +{ + LOG_API("nAllocationResize1D, con(%p), alloc(%p), sizeX(%i)", con, (RsAllocation)alloc, dimX); + rsAllocationResize1D(con, (RsAllocation)alloc, dimX); +} + +static void +nAllocationResize2D(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jint dimX, jint dimY) +{ + LOG_API("nAllocationResize1D, con(%p), alloc(%p), sizeX(%i), sizeY(%i)", con, (RsAllocation)alloc, dimX, dimY); + rsAllocationResize2D(con, (RsAllocation)alloc, dimX, dimY); +} + // ----------------------------------- static int @@ -1252,6 +1266,8 @@ static JNINativeMethod methods[] = { {"rsnAllocationRead", "(II[I)V", (void*)nAllocationRead_i }, {"rsnAllocationRead", "(II[F)V", (void*)nAllocationRead_f }, {"rsnAllocationGetType", "(II)I", (void*)nAllocationGetType}, +{"rsnAllocationResize1D", "(III)V", (void*)nAllocationResize1D }, +{"rsnAllocationResize2D", "(IIII)V", (void*)nAllocationResize2D }, {"rsnAdapter1DBindAllocation", "(III)V", (void*)nAdapter1DBindAllocation }, {"rsnAdapter1DSetConstraint", "(IIII)V", (void*)nAdapter1DSetConstraint }, |