<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@igalia.com" title="Carlos Garcia Campos <cgarcia@igalia.com>"> <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">> Comment on <span class=""><a href="attachment.cgi?id=282417&action=diff" name="attach_282417" title="Rebased patch">attachment 282417</a> <a href="attachment.cgi?id=282417&action=edit" title="Rebased patch">[details]</a></span>
> Rebased patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=282417&action=review">https://bugs.webkit.org/attachment.cgi?id=282417&action=review</a>
>
> >>> Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:217
> >>> +void CompositingCoordinator::updateImageBacking(CoordinatedImageBackingID imageID, RefPtr<CoordinatedSurface>& coordinatedSurface)
> >>
> >> I don't think this should be receiving a reference to RefPtr.
> >
> > 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.
>
> Passing a reference to a non-const RefPtr object here, you'd expect the
> method to modify it. That's not what's happening here, and if it were, you'd
> expect the method to return a new RefPtr.</span >
Ah, I see, I didn't notice it was non-const.
<span class="quote">> A rvalue reference to the RefPtr would make sense, so you'd copyRef() it
> into the method call, and move it in this method to the std::make_pair()
> call.
>
> >>> Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:286
> >>> +void CompositingCoordinator::createUpdateAtlas(uint32_t atlasID, RefPtr<CoordinatedSurface>& coordinatedSurface)
> >>
> >> I don't think this should be receiving a reference to RefPtr.
> >
> > Isn't that automatic? doesn't auto deduce it's a pointer?
>
> It does, but it doesn't tell me that when I look at it. auto* provides more
> info, shows that it's not a RefPtr<> 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>