Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d202dfd3 authored by John Reck's avatar John Reck
Browse files

Move shader cache out of code cache

Test: make && perfetto trace
Fixes: 262018792

Change-Id: I18f8dd0d4ee097e458e75009ec91868371ed6e31
parent 8f5595eb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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) {