<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - REGRESSION (r206247): Painting milestones can be delayed until the next layer flush"
   href="https://bugs.webkit.org/show_bug.cgi?id=164340#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - REGRESSION (r206247): Painting milestones can be delayed until the next layer flush"
   href="https://bugs.webkit.org/show_bug.cgi?id=164340">bug 164340</a>
              from <span class="vcard"><a class="email" href="mailto:simon.fraser&#64;apple.com" title="Simon Fraser (smfr) &lt;simon.fraser&#64;apple.com&gt;"> <span class="fn">Simon Fraser (smfr)</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=293734&amp;action=diff" name="attach_293734" title="Have WebKit, not WebCore, defer sending the milestones until after the commit">attachment 293734</a> <a href="attachment.cgi?id=293734&amp;action=edit" title="Have WebKit, not WebCore, defer sending the milestones until after the commit">[details]</a></span>
Have WebKit, not WebCore, defer sending the milestones until after the commit

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=293734&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=293734&amp;action=review</a>

<span class="quote">&gt; Source/WebCore/ChangeLog:11
&gt; +        To give WebKit a chance to deliver the painting milestones to its client after the commit,
&gt; +        we must tell it about them before or during the commit. To that end, we should not defer
&gt; +        the call to firePaintRelatedMilestonesIfNeeded until after the commit.</span >

Was it deferred for a good reason, like coalescing?

<span class="quote">&gt; Source/WebCore/rendering/RenderLayerCompositor.cpp:572
&gt; +        frameView.firePaintRelatedMilestonesIfNeeded();</span >

Does one really &quot;fire&quot; a milestone, or just reach or pass it?

<span class="quote">&gt; Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:428
&gt; +            if (TiledCoreAnimationDrawingArea* drawingArea = static_cast&lt;TiledCoreAnimationDrawingArea*&gt;(retainedPage-&gt;drawingArea())) {</span >

auto foo = downcast&lt;TiledCoreAnimationDrawingArea&gt;() ?

When is drawingArea != this? Very confusing to fetch it here again.

<span class="quote">&gt; Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:431
&gt; +                if (drawingArea-&gt;m_pendingNewlyReachedLayoutMilestones)
&gt; +                    retainedPage-&gt;send(Messages::WebPageProxy::DidReachLayoutMilestone(drawingArea-&gt;m_pendingNewlyReachedLayoutMilestones));
&gt; +                drawingArea-&gt;m_pendingNewlyReachedLayoutMilestones = 0;</span >

I would like to see this moved to a self-contained function.

<span class="quote">&gt; Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:439
&gt; +                if (drawingArea-&gt;m_pendingNewlyReachedLayoutMilestones)
&gt; +                    retainedPage-&gt;send(Messages::WebPageProxy::DidReachLayoutMilestone(drawingArea-&gt;m_pendingNewlyReachedLayoutMilestones));
&gt; +                drawingArea-&gt;m_pendingNewlyReachedLayoutMilestones = 0;</span >

...which you could also call here.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>