summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/RenderScript.java
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2015-07-17 23:14:36 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-17 23:14:36 +0000
commitdd67c9d6a886dfc6ff18fc9e3809d77c9ed7a105 (patch)
tree2ba8aeb9137686e2f3d74f76798019b323db5c8e /rs/java/android/renderscript/RenderScript.java
parent98ddad4031741bc5a1be7ef651929a34693930bb (diff)
parent0f5b7bc2fe2ae554ab1f044eb5b10aab5f4812cb (diff)
am 0f5b7bc2: am 79a1bde2: Merge "Add a flag to the API to specify -O0 on the bcc command line."
* commit '0f5b7bc2fe2ae554ab1f044eb5b10aab5f4812cb': 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.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java
index f8028eeccacf..fc0cd27ce513 100644
--- a/rs/java/android/renderscript/RenderScript.java
+++ b/rs/java/android/renderscript/RenderScript.java
@@ -95,6 +95,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.
*/
@@ -1363,7 +1371,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.");
}