Do RS caching the same way HardwareRenderer does.
Eliminates the need for an application context for caching. Change-Id: I4374738083b5eb4ce983d2cb5409428e3668c423
This commit is contained in:
@@ -92,13 +92,9 @@ public class ScriptC extends Script {
|
||||
throw new Resources.NotFoundException();
|
||||
}
|
||||
|
||||
// E.g, /system/apps/Fountain.apk
|
||||
//String packageName = rs.getApplicationContext().getPackageResourcePath();
|
||||
// For res/raw/fountain.bc, it wil be /com.android.fountain:raw/fountain
|
||||
String resName = resources.getResourceEntryName(resourceID);
|
||||
String cacheDir = rs.getApplicationContext().getCacheDir().toString();
|
||||
|
||||
Log.v(TAG, "Create script for resource = " + resName);
|
||||
return rs.nScriptCCreate(resName, cacheDir, pgm, pgmLength);
|
||||
return rs.nScriptCCreate(resName, rs.mCachePath, pgm, pgmLength);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user