Add ReportRenderingThreads function to WebView function table
Test: this CL adds new API stubs, no logic to test yet.
Bug: 329219352
Change-Id: I84add4ac39119a255cbcc6fc56d6c6e62b5d4a02
diff --git a/libs/hwui/WebViewFunctorManager.cpp b/libs/hwui/WebViewFunctorManager.cpp
index 6fc251d..5b4ab5f 100644
--- a/libs/hwui/WebViewFunctorManager.cpp
+++ b/libs/hwui/WebViewFunctorManager.cpp
@@ -86,6 +86,10 @@
WebViewFunctorManager::instance().releaseFunctor(functor);
}
+void WebViewFunctor_reportRenderingThreads(int functor, const int32_t* thread_ids, size_t size) {
+ WebViewFunctorManager::instance().reportRenderingThreads(functor, thread_ids, size);
+}
+
static std::atomic_int sNextId{1};
WebViewFunctor::WebViewFunctor(void* data, const WebViewFunctorCallbacks& callbacks,
@@ -260,6 +264,10 @@
funcs.transactionDeleteFunc(transaction);
}
+void WebViewFunctor::reportRenderingThreads(const int32_t* thread_ids, size_t size) {
+ // TODO(b/329219352): Pass the threads to HWUI and update the ADPF session.
+}
+
WebViewFunctorManager& WebViewFunctorManager::instance() {
static WebViewFunctorManager sInstance;
return sInstance;
@@ -346,6 +354,17 @@
}
}
+void WebViewFunctorManager::reportRenderingThreads(int functor, const int32_t* thread_ids,
+ size_t size) {
+ std::lock_guard _lock{mLock};
+ for (auto& iter : mFunctors) {
+ if (iter->id() == functor) {
+ iter->reportRenderingThreads(thread_ids, size);
+ break;
+ }
+ }
+}
+
sp<WebViewFunctor::Handle> WebViewFunctorManager::handleFor(int functor) {
std::lock_guard _lock{mLock};
for (auto& iter : mActiveFunctors) {