diff options
Diffstat (limited to 'rs/java/android/renderscript/ScriptC.java')
-rw-r--r-- | rs/java/android/renderscript/ScriptC.java | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/rs/java/android/renderscript/ScriptC.java b/rs/java/android/renderscript/ScriptC.java index bf706c131e85..00ebe5756589 100644 --- a/rs/java/android/renderscript/ScriptC.java +++ b/rs/java/android/renderscript/ScriptC.java @@ -84,13 +84,6 @@ public class ScriptC extends Script { setID(id); } - /** - * Name of the file that holds the object cache. - */ - private static final String CACHE_PATH = "com.android.renderscript.cache"; - - static String mCachePath; - private static synchronized long internalCreate(RenderScript rs, Resources resources, int resourceID) { byte[] pgm; int pgmLength; @@ -122,26 +115,12 @@ public class ScriptC extends Script { String resName = resources.getResourceEntryName(resourceID); - // Create the RS cache path if we haven't done so already. - if (mCachePath == null) { - File f = new File(RenderScriptCacheDir.mCacheDir, CACHE_PATH); - mCachePath = f.getAbsolutePath(); - f.mkdirs(); - } // Log.v(TAG, "Create script for resource = " + resName); - return rs.nScriptCCreate(resName, mCachePath, pgm, pgmLength); + return rs.nScriptCCreate(resName, RenderScript.getCachePath(), pgm, pgmLength); } private static synchronized long internalStringCreate(RenderScript rs, String resName, byte[] bitcode) { - // Create the RS cache path if we haven't done so already. - if (mCachePath == null) { - File f = new File(RenderScriptCacheDir.mCacheDir, CACHE_PATH); - mCachePath = f.getAbsolutePath(); - f.mkdirs(); - } // Log.v(TAG, "Create script for resource = " + resName); - return rs.nScriptCCreate(resName, mCachePath, bitcode, bitcode.length); + return rs.nScriptCCreate(resName, RenderScript.getCachePath(), bitcode, bitcode.length); } - - } |