From e8f2e445fdb138416043a16659bbf86fbbd3fff8 Mon Sep 17 00:00:00 2001 From: Yang Ni Date: Tue, 15 Mar 2016 16:00:02 -0700 Subject: [PATCH] Use proper ScriptCall size in nScriptForEach() Bug: 26498479 Although the size of struct ScriptCall is not used underneath in the runtime or drivers, assign the correct value here to avoid confusion. Change-Id: I8db19538b9f70f3bf9ee849a8724da3d9ee04785 --- rs/jni/android_renderscript_RenderScript.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rs/jni/android_renderscript_RenderScript.cpp b/rs/jni/android_renderscript_RenderScript.cpp index 4e667c6591331..e0f5934cab74c 100644 --- a/rs/jni/android_renderscript_RenderScript.cpp +++ b/rs/jni/android_renderscript_RenderScript.cpp @@ -2071,6 +2071,8 @@ nScriptForEach(JNIEnv *_env, jobject _this, jlong con, jlong script, jint slot, sc.array4End = 0; sca = ≻ + // sc_size is required, but unused, by the runtime and drivers. + sc_size = sizeof(sc); } rsScriptForEachMulti((RsContext)con, (RsScript)script, slot,