summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/RenderScript.java
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2013-04-10 10:22:52 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-04-10 10:22:52 -0700
commit0664479a2bb5dd3341eb666b7ebabaf871c3b95e (patch)
treea96b4e818f8a6d24bf81069893219919f7f29926 /graphics/java/android/renderscript/RenderScript.java
parent8f66c387cc60b8904cf337e97475c7407277a410 (diff)
parent439752d484b93efff52bc4e95c96a0be86c87f1e (diff)
am 439752d4: Merge "Defer RS cache creation until a ScriptC is built." into jb-mr2-dev
* commit '439752d484b93efff52bc4e95c96a0be86c87f1e': Defer RS cache creation until a ScriptC is built.
Diffstat (limited to 'graphics/java/android/renderscript/RenderScript.java')
-rw-r--r--graphics/java/android/renderscript/RenderScript.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index 2438532c98dd..d5af2767bb40 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -83,11 +83,7 @@ public class RenderScript {
native void nContextInitToClient(int con);
native void nContextDeinitToClient(int con);
- /**
- * Name of the file that holds the object cache.
- */
- private static final String CACHE_PATH = "com.android.renderscript.cache";
- static String mCachePath;
+ static File mCacheDir;
/**
* Sets the directory to use as a persistent storage for the
@@ -97,9 +93,8 @@ public class RenderScript {
* @param cacheDir A directory the current process can write to
*/
public static void setupDiskCache(File cacheDir) {
- File f = new File(cacheDir, CACHE_PATH);
- mCachePath = f.getAbsolutePath();
- f.mkdirs();
+ // Defer creation of cache path to nScriptCCreate().
+ mCacheDir = cacheDir;
}
public enum ContextType {