Bug 115753 - Still possible to fire paint-related LayoutMilestones before CA has committed the changes
Summary: Still possible to fire paint-related LayoutMilestones before CA has committed...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Beth Dakin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-05-07 13:43 PDT by Beth Dakin
Modified: 2013-05-28 21:57 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.59 KB, patch)
2013-05-07 13:45 PDT, Beth Dakin
no flags Details | Formatted Diff | Diff
Patch (3.56 KB, patch)
2013-05-07 14:02 PDT, Beth Dakin
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.

<rdar://problem/13822315>
Comment 1 Beth Dakin 2013-05-07 13:45:45 PDT
Created attachment 200968 [details]
Patch
Comment 2 Tim Horton 2013-05-07 13:51:56 PDT
Comment on attachment 200968 [details]
Patch

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]
Patch

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]
Patch

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.