diff options
author | Stephen Hines <srhines@google.com> | 2015-07-17 22:58:49 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-17 22:58:49 +0000 |
commit | 0f5b7bc2fe2ae554ab1f044eb5b10aab5f4812cb (patch) | |
tree | b6118c27fa065cd4658917361277dec8b225059c /rs/java/android/renderscript/RenderScript.java | |
parent | 71165ea6404da5282db8459f9f20e374f4c07cdc (diff) | |
parent | 79a1bde2e0f38507738743e490beb895dae7b03e (diff) |
am 79a1bde2: Merge "Add a flag to the API to specify -O0 on the bcc command line."
* commit '79a1bde2e0f38507738743e490beb895dae7b03e':
Add a flag to the API to specify -O0 on the bcc command line.
Diffstat (limited to 'rs/java/android/renderscript/RenderScript.java')
-rw-r--r-- | rs/java/android/renderscript/RenderScript.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java index 0505a4bb78f8..0f4dced98bd2 100644 --- a/rs/java/android/renderscript/RenderScript.java +++ b/rs/java/android/renderscript/RenderScript.java @@ -96,6 +96,14 @@ public class RenderScript { */ public static final int CREATE_FLAG_WAIT_FOR_ATTACH = 0x0008; + /** + * @hide + * Context creation flag which specifies that optimization level 0 is + * passed to the device compiler upon execution of the RenderScript kernel. + * The default optimization level is 3. + */ + public static final int CREATE_FLAG_OPT_LEVEL_0 = 0x0010; + /* * Detect the bitness of the VM to allow FieldPacker to do the right thing. */ @@ -1350,7 +1358,8 @@ public class RenderScript { return null; } - if ((flags & ~(CREATE_FLAG_LOW_LATENCY | CREATE_FLAG_LOW_POWER | CREATE_FLAG_WAIT_FOR_ATTACH)) != 0) { + if ((flags & ~(CREATE_FLAG_LOW_LATENCY | CREATE_FLAG_LOW_POWER | + CREATE_FLAG_WAIT_FOR_ATTACH | CREATE_FLAG_OPT_LEVEL_0)) != 0) { throw new RSIllegalArgumentException("Invalid flags passed."); } |