Skip to content

Commit

Permalink
Plumb exposed unfilled area logging through RemoteScrollingTree for S…
Browse files Browse the repository at this point in the history
…crollPerf

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
  • Loading branch information
nmoucht committed Dec 1, 2022
1 parent ffe47a6 commit 862f27e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
Expand Up @@ -34,6 +34,7 @@
#include "RemoteScrollingCoordinatorTransaction.h"
#include "WebPageProxy.h"
#include "WebProcessProxy.h"
#include <WebCore/PerformanceLoggingClient.h>
#include <WebCore/RuntimeApplicationChecks.h>
#include <WebCore/ScrollingStateTree.h>
#include <WebCore/ScrollingTreeFrameScrollingNode.h>
Expand Down Expand Up @@ -272,6 +273,11 @@ void RemoteScrollingCoordinatorProxy::resetStateAfterProcessExited()
m_uiState.reset();
}

void RemoteScrollingCoordinatorProxy::reportExposedUnfilledArea(MonotonicTime timestamp, unsigned unfilledArea)
{
m_webPageProxy.logScrollingEvent(static_cast<uint32_t>(PerformanceLoggingClient::ScrollingEvent::ExposedTilelessArea), timestamp, unfilledArea);
}

} // namespace WebKit

#endif // ENABLE(UI_SIDE_COMPOSITING)
Expand Up @@ -119,6 +119,7 @@ class RemoteScrollingCoordinatorProxy : public CanMakeWeakPtr<RemoteScrollingCoo
WebCore::ScrollingTreeScrollingNode* rootNode() const;

virtual void displayDidRefresh(WebCore::PlatformDisplayID);
void reportExposedUnfilledArea(MonotonicTime, unsigned unfilledArea);

protected:
RemoteScrollingTree* scrollingTree() const { return m_scrollingTree.get(); }
Expand Down
Expand Up @@ -100,6 +100,11 @@ void RemoteScrollingTree::currentSnapPointIndicesDidChange(ScrollingNodeID nodeI
m_scrollingCoordinatorProxy.currentSnapPointIndicesDidChange(nodeID, horizontal, vertical);
}

void RemoteScrollingTree::reportExposedUnfilledArea(MonotonicTime time, unsigned unfilledArea)
{
m_scrollingCoordinatorProxy.reportExposedUnfilledArea(time, unfilledArea);
}

} // namespace WebKit

#endif // ENABLE(UI_SIDE_COMPOSITING)
Expand Up @@ -57,6 +57,7 @@ class RemoteScrollingTree : public WebCore::ScrollingTree {
bool scrollingTreeNodeRequestsScroll(WebCore::ScrollingNodeID, const WebCore::RequestedScrollData&) final;

void currentSnapPointIndicesDidChange(WebCore::ScrollingNodeID, std::optional<unsigned> horizontal, std::optional<unsigned> vertical) final;
void reportExposedUnfilledArea(MonotonicTime, unsigned unfilledArea) override;

protected:
explicit RemoteScrollingTree(RemoteScrollingCoordinatorProxy&);
Expand Down

0 comments on commit 862f27e

Please sign in to comment.