<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ThreadedCompositor] Opening the inspector in a window causes a crash."
   href="https://bugs.webkit.org/show_bug.cgi?id=154444#c15">Comment # 15</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ThreadedCompositor] Opening the inspector in a window causes a crash."
   href="https://bugs.webkit.org/show_bug.cgi?id=154444">bug 154444</a>
              from <span class="vcard"><a class="email" href="mailto:cgarcia&#64;igalia.com" title="Carlos Garcia Campos &lt;cgarcia&#64;igalia.com&gt;"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=154444#c14">comment #14</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=281169&amp;action=diff" name="attach_281169" title="Updated patch">attachment 281169</a> <a href="attachment.cgi?id=281169&amp;action=edit" title="Updated patch">[details]</a></span>
&gt; Updated patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=281169&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=281169&amp;action=review</a>
&gt; 
&gt; &gt; Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:66
&gt; &gt; +        m_scene-&gt;setActive(handle);
&gt; 
&gt; !!handle converts better (i.e. cleaner) to a boolean value.</span >

Ok.

<span class="quote">&gt; &gt; Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:69
&gt; &gt; +        ensureGLContext();
&gt; &gt; +        updateViewport();
&gt; 
&gt; It's not clear from the change log -- are these calls required in case of
&gt; handle being null?</span >

Ok, I'll update the ChangeLog. When the handler is null, ensureGLContext actually destroys the current cotext, to ensure any pending or further operation on the compositing run loop returns early in !glContext(). The updateViewport is to ensure we re-schedule a display on next frame for the new handle, since we have cancelled any previous one. It's probably not needed in the case of null handle.

<span class="quote">&gt; &gt; Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:202
&gt; &gt; +    scheduleLayerFlush();
&gt; 
&gt; Why cancel and then re-schedule the layer flush? Just re-scheduling should
&gt; be enough.</span >

Since setting the new handler on the compositor is sync now, I want to make sure we cancel any scheduled layer flush before actually changing the handler, and then scheduling a new one once we have the new handler. That's exactly what we do in LayerTreeHostGtk too.</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>