From 4fc67eebf1410ae48f43b40902c0ccf3b5b2b4bf Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 23 Aug 2023 17:25:41 +0200 Subject: [PATCH] Enable Android Dynamic Performance Framework --- build/bromite.gn_args | 1 + build/bromite_patches_list.txt | 3 +- ...ndroid-Dynamic-Performance-Framework.patch | 39 +++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 build/patches/00Enable-Android-Dynamic-Performance-Framework.patch diff --git a/build/bromite.gn_args b/build/bromite.gn_args index f9469113..3801305a 100644 --- a/build/bromite.gn_args +++ b/build/bromite.gn_args @@ -48,3 +48,4 @@ enable_arcore=false enable_openxr=false enable_gvr_services=false enable_feed_v2=false +is_high_end_android=true \ No newline at end of file diff --git a/build/bromite_patches_list.txt b/build/bromite_patches_list.txt index 4d03a028..bbdb0d26 100644 --- a/build/bromite_patches_list.txt +++ b/build/bromite_patches_list.txt @@ -286,4 +286,5 @@ Timezone-customization.patch 00allow-the-download-of-clang-for-windows-crossbuild.patch 00Temp-disable-predictive-back-gesture.patch 00Add-option-to-disable-snapshots.patch -00Disable-PartnerCustomizations.patch \ No newline at end of file +00Disable-PartnerCustomizations.patch +00Enable-Android-Dynamic-Performance-Framework.patch \ No newline at end of file diff --git a/build/patches/00Enable-Android-Dynamic-Performance-Framework.patch b/build/patches/00Enable-Android-Dynamic-Performance-Framework.patch new file mode 100644 index 00000000..4c070418 --- /dev/null +++ b/build/patches/00Enable-Android-Dynamic-Performance-Framework.patch @@ -0,0 +1,39 @@ +From: uazo +Date: Wed, 23 Aug 2023 13:49:19 +0000 +Subject: Enable Android Dynamic Performance Framework + +--- + chrome/version.gni | 2 +- + components/viz/common/features.cc | 5 +++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/chrome/version.gni b/chrome/version.gni +--- a/chrome/version.gni ++++ b/chrome/version.gni +@@ -68,7 +68,7 @@ if (is_mac) { + _version_dictionary_template += "trichrome_auto_64_32_version_code = \"@TRICHROME_AUTO_64_32_VERSION_CODE@\" " + _version_dictionary_template += + "trichrome_64_version_code = \"@TRICHROME_64_VERSION_CODE@\" " +- if (target_cpu == "arm64") { ++ if (target_cpu == "arm64" || target_cpu == "x64") { + _version_dictionary_template += "trichrome_64_32_high_version_code = \"@TRICHROME_64_32_HIGH_VERSION_CODE@\" " + } + _version_dictionary_template += +diff --git a/components/viz/common/features.cc b/components/viz/common/features.cc +--- a/components/viz/common/features.cc ++++ b/components/viz/common/features.cc +@@ -286,9 +286,10 @@ const base::FeatureParam kADPFMidFrameBoostDurationMultiplier{ + + // If enabled, Chrome includes the Renderer Main thread(s) into the + // ADPF(Android Dynamic Performance Framework) hint session. ++// see https://source.chromium.org/chromium/chromium/src/+/e7507d15614ac7f499fb89086b3a09772fa8deb4 + BASE_FEATURE(kEnableADPFRendererMain, +- "EnableADPFRendererMain", +- base::FEATURE_DISABLED_BY_DEFAULT); ++ "EnableADPFRendererMain", // enabled ++ base::FEATURE_ENABLED_BY_DEFAULT); // by default + + bool IsDelegatedCompositingEnabled() { + return base::FeatureList::IsEnabled(kDelegatedCompositing); +-- +2.25.1