Patches for 145 (final version)

This commit is contained in:
Carmelo Messina
2026-02-05 14:18:21 +01:00
parent 0ae84a9ecb
commit eab93d000f
43 changed files with 1433 additions and 444 deletions
@@ -4,10 +4,11 @@ Subject: Enable Android Dynamic Performance Framework
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
---
chrome/version.gni | 8 ++++----
components/viz/common/features.cc | 2 ++
components/viz/service/performance_hint/hint_session.cc | 5 +----
3 files changed, 7 insertions(+), 8 deletions(-)
chrome/version.gni | 8 ++++----
components/viz/common/features.cc | 2 ++
components/viz/service/performance_hint/hint_session.cc | 5 +----
.../platform/widget/input/widget_input_handler_manager.cc | 5 +++++
4 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/chrome/version.gni b/chrome/version.gni
--- a/chrome/version.gni
@@ -44,15 +45,7 @@ diff --git a/chrome/version.gni b/chrome/version.gni
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
@@ -161,6 +161,7 @@ BASE_FEATURE(kWebViewNewInvalidateHeuristic, base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kWebViewNewInvalidateHeuristicForTV,
base::FEATURE_DISABLED_BY_DEFAULT);
+SET_CROMITE_FEATURE_ENABLED(kWebViewEnableADPFRendererMain);
// If enabled and the device's SOC manufacturer is in the allowlist, WebView
// reports the set of threads involved in frame production to HWUI, and they're
@@ -241,6 +242,7 @@ BASE_FEATURE(kEnableADPFRendererMain, base::FEATURE_ENABLED_BY_DEFAULT);
@@ -241,6 +241,7 @@ BASE_FEATURE(kEnableADPFRendererMain, base::FEATURE_ENABLED_BY_DEFAULT);
// If enabled, Chrome puts Renderer Main threads into a separate
// ADPF(Android Dynamic Performance Framework) hint session, and does not
// report any timing hints from this session.
@@ -60,6 +53,14 @@ diff --git a/components/viz/common/features.cc b/components/viz/common/features.
BASE_FEATURE(kEnableADPFSeparateRendererMainSession,
base::FEATURE_DISABLED_BY_DEFAULT);
@@ -538,6 +539,7 @@ bool IsBrowserControlsInVizEnabled() {
bool ShouldUseAdpfForSoc(std::string_view soc_allowlist,
std::string_view soc) {
+ if ((true)) return true;
std::vector<std::string_view> allowlist = base::SplitStringPiece(
soc_allowlist, "|", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
return base::Contains(allowlist, soc);
diff --git a/components/viz/service/performance_hint/hint_session.cc b/components/viz/service/performance_hint/hint_session.cc
--- a/components/viz/service/performance_hint/hint_session.cc
+++ b/components/viz/service/performance_hint/hint_session.cc
@@ -81,4 +82,19 @@ diff --git a/components/viz/service/performance_hint/hint_session.cc b/component
std::string soc_allowlist = features::kADPFSocManufacturerAllowlist.Get();
std::string soc = base::SysInfo::SocManufacturer();
diff --git a/third_party/blink/renderer/platform/widget/input/widget_input_handler_manager.cc b/third_party/blink/renderer/platform/widget/input/widget_input_handler_manager.cc
--- a/third_party/blink/renderer/platform/widget/input/widget_input_handler_manager.cc
+++ b/third_party/blink/renderer/platform/widget/input/widget_input_handler_manager.cc
@@ -221,6 +221,11 @@ class SynchronousCompositorProxyRegistry
renderer_threads.push_back(
viz::Thread{io_thread_id_, viz::Thread::Type::kIO});
}
+ // Renderer Main is included in the set of threads reported to the HWUI.
+ if (main_thread_id_ != base::kInvalidThreadId) {
+ renderer_threads.push_back(
+ viz::Thread{main_thread_id_, viz::Thread::Type::kMain});
+ }
proxy_->SetThreads(renderer_threads);
}
--