Bug 249736 - "Commit time" data is wrong with UI-side compositing
Summary: "Commit time" data is wrong with UI-side compositing
Status: RESOLVED DUPLICATE of bug 249750
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-21 12:01 PST by Simon Fraser (smfr)
Modified: 2022-12-22 11:44 PST (History)
5 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-21 12:01:51 PST
When web inspecting iOS, or macOS with UI-side compositing enabled, the green "commit time" events in the timeline are always short. I think they only track the time in the fake CA commit triggers in RemoteLayerTreeDrawingArea::displayDidRefresh(), because they are registered like this:


void RemoteLayerTreeDrawingArea::addCommitHandlers()
{
    if (m_webPage.firstFlushAfterCommit())
        return;

    [CATransaction addCommitHandler:[retainedPage = Ref { m_webPage }] {
        if (Page* corePage = retainedPage->corePage()) {
            if (Frame* coreFrame = retainedPage->mainFrame())
                corePage->inspectorController().willComposite(*coreFrame);
        }
    } forPhase:kCATransactionPhasePreLayout];
    
    [CATransaction addCommitHandler:[retainedPage = Ref { m_webPage }] {
        if (Page* corePage = retainedPage->corePage()) {
            if (Frame* coreFrame = retainedPage->mainFrame())
                corePage->inspectorController().didComposite(*coreFrame);
        }
        retainedPage->setFirstFlushAfterCommit(false);
    } forPhase:kCATransactionPhasePostCommit];
    
    m_webPage.setFirstFlushAfterCommit(true);
}

This is wrong because there are no CA Commits (other than this garbage-collection one) in the web process.
Comment 1 Radar WebKit Bug Importer 2022-12-21 12:02:17 PST
<rdar://problem/103608655>
Comment 2 Simon Fraser (smfr) 2022-12-22 11:44:37 PST
Bug 249750 fixed this but see also bug 249796.

*** This bug has been marked as a duplicate of bug 249750 ***