<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Coordinated Graphics] Modernize and cleanup CompositingCoordinator"
   href="https://bugs.webkit.org/show_bug.cgi?id=159212#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Coordinated Graphics] Modernize and cleanup CompositingCoordinator"
   href="https://bugs.webkit.org/show_bug.cgi?id=159212">bug 159212</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=159212#c5">comment #5</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=282417&amp;action=diff" name="attach_282417" title="Rebased patch">attachment 282417</a> <a href="attachment.cgi?id=282417&amp;action=edit" title="Rebased patch">[details]</a></span>
&gt; Rebased patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=282417&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=282417&amp;action=review</a>
&gt; 
&gt; &gt;&gt;&gt; Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:217
&gt; &gt;&gt;&gt; +void CompositingCoordinator::updateImageBacking(CoordinatedImageBackingID imageID, RefPtr&lt;CoordinatedSurface&gt;&amp; coordinatedSurface)
&gt; &gt;&gt; 
&gt; &gt;&gt; I don't think this should be receiving a reference to RefPtr.
&gt; &gt; 
&gt; &gt; Could you elaborate? what's wrong with the reference and what should I do instead? just copying the RefPtr? I don't understand whey PassRefPtr is used there TBH.
&gt; 
&gt; Passing a reference to a non-const RefPtr object here, you'd expect the
&gt; method to modify it. That's not what's happening here, and if it were, you'd
&gt; expect the method to return a new RefPtr.</span >

Ah, I see, I didn't notice it was non-const.

<span class="quote">&gt; A rvalue reference to the RefPtr would make sense, so you'd copyRef() it
&gt; into the method call, and move it in this method to the std::make_pair()
&gt; call.
&gt; 
&gt; &gt;&gt;&gt; Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:286
&gt; &gt;&gt;&gt; +void CompositingCoordinator::createUpdateAtlas(uint32_t atlasID, RefPtr&lt;CoordinatedSurface&gt;&amp; coordinatedSurface)
&gt; &gt;&gt; 
&gt; &gt;&gt; I don't think this should be receiving a reference to RefPtr.
&gt; &gt; 
&gt; &gt; Isn't that automatic? doesn't auto deduce it's a pointer?
&gt; 
&gt; It does, but it doesn't tell me that when I look at it. auto* provides more
&gt; info, shows that it's not a RefPtr&lt;&gt; or an iterator or anything.</span >

Ah, it's just for readability, I agree indeed. I'll submit an updated patch, thanks!</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>