Bug 249796 - "Frame End" timeline point is wrong with UI-side compositing
Summary: "Frame End" timeline point is wrong with UI-side compositing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nikos Mouchtaris
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-22 11:42 PST by Simon Fraser (smfr)
Modified: 2023-08-17 12:58 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2022-12-22 11:42:52 PST
`InspectorTimelineAgent::internalStart` uses this mechanism to detect "frame end":

    m_frameStopObserver = makeUnique<RunLoopObserver>(static_cast<CFIndex>(RunLoopObserver::WellKnownRunLoopOrders::InspectorFrameEnd), [this]() {

This doesn't work with UI-side compositing (i.e. iOS, and future macOS), because a "frame" can extend over multiple turns of the CFRunLoop while we wait for backing store flushing (see where RemoteLayerTreeDrawingArea calls didCompleteRenderingUpdateDisplay()).
Comment 1 Radar WebKit Bug Importer 2022-12-22 11:43:10 PST
<rdar://problem/103645351>
Comment 2 Simon Fraser (smfr) 2022-12-22 11:47:17 PST
Currently on iOS, "frame end" will happen before "composite end" in some cases.
Comment 3 Nikos Mouchtaris 2023-05-09 15:19:17 PDT
Pull request: https://github.com/WebKit/WebKit/pull/13661
Comment 4 EWS 2023-05-10 12:30:11 PDT
Committed 263917@main (f11ea318b8fc): <https://commits.webkit.org/263917@main>

Reviewed commits have been landed. Closing PR #13661 and removing active labels.