diff options
author | Stephen Hines <srhines@google.com> | 2013-04-09 23:51:56 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2013-04-10 01:20:47 -0700 |
commit | 7d25a829d3da96fb6ac0d285aa1bfb2022271bee (patch) | |
tree | c39d28f869452758074215736f6b5a5c80f676e2 /graphics/java/android/renderscript/RenderScript.java | |
parent | d7094ea29bac0c3c296b79caca150e3a543fe39b (diff) |
Defer RS cache creation until a ScriptC is built.
Bug: 8582926
Change-Id: If017f41382f023f8f6ddd78ba198402d427c95f8
Diffstat (limited to 'graphics/java/android/renderscript/RenderScript.java')
-rw-r--r-- | graphics/java/android/renderscript/RenderScript.java | 11 |
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 { |