summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ScriptGroup.java
diff options
context:
space:
mode:
authorYang Ni <yangni@google.com>2016-03-10 16:12:31 -0800
committerYang Ni <yangni@google.com>2016-03-21 16:53:22 -0700
commit15fcf61dc0f1206b8eb562df8984035a599d290a (patch)
tree2d95ed65dda268c953f1e2e7a1e95830084b040a /rs/java/android/renderscript/ScriptGroup.java
parent46b5258138c82692191ff261cfa7e119f963b778 (diff)
Correctly init code cache path for RS
Bug: 27439261 Script Group needs to know the code cache path before it can call bcc to merge kernels. However, before this change, the code cache path has been initialized by the ScriptC class. In the case where a script group (or even the entire app) does not contain any regular script but only intrinsics, the code cache would remain uninitialized. Fixed this by initializing the code cache path in the RenderScript class the first time when the accessor method is called. Change-Id: I87f9e62e0f3b479f94e43daa3e9695a5b38710db (cherry picked from commit 689f63770048589e1001ce99faf1d2eaf9780a80)
Diffstat (limited to 'rs/java/android/renderscript/ScriptGroup.java')
-rw-r--r--rs/java/android/renderscript/ScriptGroup.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/rs/java/android/renderscript/ScriptGroup.java b/rs/java/android/renderscript/ScriptGroup.java
index 9bbacbc0d84c..9357c3bb0428 100644
--- a/rs/java/android/renderscript/ScriptGroup.java
+++ b/rs/java/android/renderscript/ScriptGroup.java
@@ -396,7 +396,7 @@ public final class ScriptGroup extends BaseObj {
for (int i = 0; i < closureIDs.length; i++) {
closureIDs[i] = closures.get(i).getID(rs);
}
- long id = rs.nScriptGroup2Create(name, ScriptC.mCachePath, closureIDs);
+ long id = rs.nScriptGroup2Create(name, RenderScript.getCachePath(), closureIDs);
setID(id);
}