Move shader cache out of code cache
Test: make && perfetto trace Fixes: 262018792 Change-Id: I18f8dd0d4ee097e458e75009ec91868371ed6e31
This commit is contained in:
@@ -6644,12 +6644,13 @@ public final class ActivityThread extends ClientTransactionHandler
|
||||
// Setup a location to store generated/compiled graphics code.
|
||||
final Context deviceContext = context.createDeviceProtectedStorageContext();
|
||||
final File codeCacheDir = deviceContext.getCodeCacheDir();
|
||||
if (codeCacheDir != null) {
|
||||
final File deviceCacheDir = deviceContext.getCacheDir();
|
||||
if (codeCacheDir != null && deviceCacheDir != null) {
|
||||
try {
|
||||
int uid = Process.myUid();
|
||||
String[] packages = getPackageManager().getPackagesForUid(uid);
|
||||
if (packages != null) {
|
||||
HardwareRenderer.setupDiskCache(codeCacheDir);
|
||||
HardwareRenderer.setupDiskCache(deviceCacheDir);
|
||||
RenderScriptCacheDir.setupDiskCache(codeCacheDir);
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
|
||||
Reference in New Issue
Block a user