From da9bab529acdb0bf5a0cbf3ac1962ca57fb6b5d7 Mon Sep 17 00:00:00 2001 From: David Ludovino Date: Sun, 1 Sep 2019 15:44:56 +0100 Subject: HACK: force hardwareAccelerated to false on all apps. This forces all apps to draw their Canvas with pure software Skia instead of HWUI. Result: an order of magnitude speedup on software rendering. Reason: HWUI uses GLES to render the Canvas. This works fine with hardware backed GLES. However, it is much slower than Skia when using a software renderer for GLES (e.g. llvmpipe or SwiftShader). Problem: breaks some apps like ScreenLock and Trebuchet. This dirty hack should be turned into a system property. Change-Id: I1b56a363fafce7dc3c56452fe03898070b7ba279 Signed-off-by: David Ludovino --- core/java/android/content/pm/PackageParser.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index edca4e625e9..c1f544fed93 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -3448,9 +3448,7 @@ public class PackageParser { ai.flags |= ApplicationInfo.FLAG_VM_SAFE_MODE; } - owner.baseHardwareAccelerated = sa.getBoolean( - com.android.internal.R.styleable.AndroidManifestApplication_hardwareAccelerated, - owner.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.ICE_CREAM_SANDWICH); + owner.baseHardwareAccelerated = false; if (owner.baseHardwareAccelerated) { ai.flags |= ApplicationInfo.FLAG_HARDWARE_ACCELERATED; } @@ -4221,11 +4219,6 @@ public class PackageParser { } if (!receiver) { - if (sa.getBoolean(R.styleable.AndroidManifestActivity_hardwareAccelerated, - hardwareAccelerated)) { - a.info.flags |= ActivityInfo.FLAG_HARDWARE_ACCELERATED; - } - a.info.launchMode = sa.getInt( R.styleable.AndroidManifestActivity_launchMode, ActivityInfo.LAUNCH_MULTIPLE); a.info.documentLaunchMode = sa.getInt( -- cgit v1.2.3