diff options
author | Jason Sams <rjsams@android.com> | 2011-04-26 14:50:00 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2011-04-26 14:50:40 -0700 |
commit | 65bdaf1c6d463d9441125d2c87a36015bfef2d95 (patch) | |
tree | 0a509884834b6eba859565b274a9cb603a0a07e6 /graphics/jni/android_renderscript_RenderScript.cpp | |
parent | e7c4a7565c7f8c8fc1ec92dc0692577fcc474750 (diff) | |
download | frameworks_base-65bdaf1c6d463d9441125d2c87a36015bfef2d95.zip frameworks_base-65bdaf1c6d463d9441125d2c87a36015bfef2d95.tar.gz frameworks_base-65bdaf1c6d463d9441125d2c87a36015bfef2d95.tar.bz2 |
Cleanup rs.spec file and code generator.
Change-Id: I369e36b222ff962fc6835bc550435c2940e2b5fd
Diffstat (limited to 'graphics/jni/android_renderscript_RenderScript.cpp')
-rw-r--r-- | graphics/jni/android_renderscript_RenderScript.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp index b752850..c3f2360 100644 --- a/graphics/jni/android_renderscript_RenderScript.cpp +++ b/graphics/jni/android_renderscript_RenderScript.cpp @@ -237,7 +237,11 @@ nContextGetErrorMessage(JNIEnv *_env, jobject _this, RsContext con) size_t receiveLen; uint32_t subID; - int id = rsContextGetMessage(con, buf, &receiveLen, &subID, sizeof(buf), true); + int id = rsContextGetMessage(con, + buf, sizeof(buf), + &receiveLen, sizeof(receiveLen), + &subID, sizeof(subID), + true); if (!id && receiveLen) { LOGV("message receive buffer too small. %i", receiveLen); } @@ -252,7 +256,11 @@ nContextGetUserMessage(JNIEnv *_env, jobject _this, RsContext con, jintArray dat jint *ptr = _env->GetIntArrayElements(data, NULL); size_t receiveLen; uint32_t subID; - int id = rsContextGetMessage(con, ptr, &receiveLen, &subID, len * 4, true); + int id = rsContextGetMessage(con, + ptr, len * 4, + &receiveLen, sizeof(receiveLen), + &subID, sizeof(subID), + true); if (!id && receiveLen) { LOGV("message receive buffer too small. %i", receiveLen); } @@ -266,7 +274,8 @@ nContextPeekMessage(JNIEnv *_env, jobject _this, RsContext con, jintArray auxDat jint *auxDataPtr = _env->GetIntArrayElements(auxData, NULL); size_t receiveLen; uint32_t subID; - int id = rsContextPeekMessage(con, &receiveLen, &subID, wait); + int id = rsContextPeekMessage(con, &receiveLen, sizeof(receiveLen), + &subID, sizeof(subID), wait); auxDataPtr[0] = (jint)subID; auxDataPtr[1] = (jint)receiveLen; _env->ReleaseIntArrayElements(auxData, auxDataPtr, 0); @@ -426,7 +435,9 @@ nAllocationCreateFromBitmap(JNIEnv *_env, jobject _this, RsContext con, jint typ bitmap.lockPixels(); const void* ptr = bitmap.getPixels(); - jint id = (jint)rsaAllocationCreateFromBitmap(con, (RsType)type, (RsAllocationMipmapControl)mip, ptr, usage); + jint id = (jint)rsaAllocationCreateFromBitmap(con, + (RsType)type, (RsAllocationMipmapControl)mip, + ptr, bitmap.getSize(), usage); bitmap.unlockPixels(); return id; } @@ -440,7 +451,9 @@ nAllocationCubeCreateFromBitmap(JNIEnv *_env, jobject _this, RsContext con, jint bitmap.lockPixels(); const void* ptr = bitmap.getPixels(); - jint id = (jint)rsaAllocationCubeCreateFromBitmap(con, (RsType)type, (RsAllocationMipmapControl)mip, ptr, usage); + jint id = (jint)rsaAllocationCubeCreateFromBitmap(con, + (RsType)type, (RsAllocationMipmapControl)mip, + ptr, bitmap.getSize(), usage); bitmap.unlockPixels(); return id; } |