[webkit-changes] [WebKit/WebKit] f23a7b: Adjust the opportunistic task scheduling heuristic...

Wenson Hsieh noreply at github.com
Thu Jun 15 18:32:30 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f23a7b1306cf98373ce8345ead29d28bf4aff570
      https://github.com/WebKit/WebKit/commit/f23a7b1306cf98373ce8345ead29d28bf4aff570
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2023-06-15 (Thu, 15 Jun 2023)

  Changed paths:
    M Source/WebCore/page/LocalFrameView.cpp
    M Source/WebCore/page/OpportunisticTaskScheduler.cpp
    M Source/WebCore/page/Page.cpp

  Log Message:
  -----------
  Adjust the opportunistic task scheduling heuristic after 265178 at main
https://bugs.webkit.org/show_bug.cgi?id=258144

Reviewed by Simon Fraser.

* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::fireLayoutRelatedMilestonesIfNeeded):
(WebCore::LocalFrameView::firePaintRelatedMilestonesIfNeeded):

Move the call to `didFirstMeaningfulPaint()` from `fireLayoutRelatedMilestonesIfNeeded()` to
`firePaintRelatedMilestonesIfNeeded()`, so that it actually tracks the completion of first
meaningful paint rather than the first visually non-empty layout.

* Source/WebCore/page/OpportunisticTaskScheduler.cpp:
(WebCore::OpportunisticTaskScheduler::runLoopObserverFired):

Use `ApproximateTime` instead of `MonotonicTime` here, when determining whether or not the
`deadline` is already in the past by the time we're idle.

* Source/WebCore/page/Page.cpp:
(WebCore::Page::renderingUpdateCompleted):

Use `preferredRenderingUpdateInterval` instead of `m_displayNominalFramesPerSecond`; the former
actually tracks the rendering update lifecycle cadence, which may differ from the true screen
refresh rate (for instance, due to throttling).

Canonical link: https://commits.webkit.org/265221@main




More information about the webkit-changes mailing list