From 862f27e0c31a23d1ac398b4239cf43baf60f486c Mon Sep 17 00:00:00 2001 From: Nikolaos Mouchtaris Date: Wed, 30 Nov 2022 18:20:55 -0800 Subject: [PATCH] Plumb exposed unfilled area logging through RemoteScrollingTree for ScrollPerf https://bugs.webkit.org/show_bug.cgi?id=248491 rdar://102783617 Reviewed by Simon Fraser. Implement reportExposedUnfilledArea for RemoteScrollingTree. Since we are already in the UIProcess we can call the logging function in WebPageProxy directly. * Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp: (WebKit::RemoteScrollingCoordinatorProxy::reportExposedUnfilledArea): * Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h: * Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: (WebKit::RemoteScrollingTree::reportExposedUnfilledArea): * Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.h: Canonical link: https://commits.webkit.org/257211@main --- .../RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp | 6 ++++++ .../RemoteLayerTree/RemoteScrollingCoordinatorProxy.h | 1 + .../UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp | 5 +++++ .../WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.h | 1 + 4 files changed, 13 insertions(+) diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp b/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp index ed4ea8198ba5..f6df95191130 100644 --- a/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp +++ b/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp @@ -34,6 +34,7 @@ #include "RemoteScrollingCoordinatorTransaction.h" #include "WebPageProxy.h" #include "WebProcessProxy.h" +#include #include #include #include @@ -272,6 +273,11 @@ void RemoteScrollingCoordinatorProxy::resetStateAfterProcessExited() m_uiState.reset(); } +void RemoteScrollingCoordinatorProxy::reportExposedUnfilledArea(MonotonicTime timestamp, unsigned unfilledArea) +{ + m_webPageProxy.logScrollingEvent(static_cast(PerformanceLoggingClient::ScrollingEvent::ExposedTilelessArea), timestamp, unfilledArea); +} + } // namespace WebKit #endif // ENABLE(UI_SIDE_COMPOSITING) diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h b/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h index 46e1caf05885..c8453ed011ee 100644 --- a/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h +++ b/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h @@ -119,6 +119,7 @@ class RemoteScrollingCoordinatorProxy : public CanMakeWeakPtr horizontal, std::optional vertical) final; + void reportExposedUnfilledArea(MonotonicTime, unsigned unfilledArea) override; protected: explicit RemoteScrollingTree(RemoteScrollingCoordinatorProxy&);