Bug 115753

Summary: Still possible to fire paint-related LayoutMilestones before CA has committed the changes
Product: WebKit Reporter: Beth Dakin <bdakin>
Component: Layout and RenderingAssignee: Beth Dakin <bdakin>
Severity: Normal CC: bdakin, commit-queue, esprehn+autocc, glenn, simon.fraser, thorton
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch simon.fraser: review+

Description Beth Dakin 2013-05-07 13:43:15 PDT
It is still possible to fire paint-related LayoutMilestones before CA has committed the changes. To ensure we wait for the commit, we should wait until the end of the runloop with a zero-delay timer.

Comment 1 Beth Dakin 2013-05-07 13:45:45 PDT
Created attachment 200968 [details]
Comment 2 Tim Horton 2013-05-07 13:51:56 PDT
Comment on attachment 200968 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=200968&action=review

> Source/WebCore/ChangeLog:17
> +        (WebCore::RenderLayerCompositor::firePaintRelatedMilestonesTimerFired):

What a bizarre name, with fire in it twice :)
Comment 3 Beth Dakin 2013-05-07 14:02:34 PDT
Created attachment 200971 [details]

Tim has a good point. Here's a patch with a better name.
Comment 4 Beth Dakin 2013-05-07 14:12:36 PDT
Thank you, Simon! http://trac.webkit.org/changeset/149691
Comment 5 Simon Fraser (smfr) 2013-05-28 21:56:10 PDT
Comment on attachment 200971 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=200971&action=review

> Source/WebCore/rendering/RenderLayerCompositor.cpp:377
> +    if (!m_paintRelatedMilestonesTimer.isActive())
> +        m_paintRelatedMilestonesTimer.startOneShot(0);

This made it so that _every_ layer flush we start a timer, which most of the time does nothing :(
Comment 6 Simon Fraser (smfr) 2013-05-28 21:57:08 PDT
Filed bug 116908.