<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Use Region instead of IntRect in PageClient and WebPageProxy setViewNeedsDisplay method"
href="https://bugs.webkit.org/show_bug.cgi?id=155747">bug 155747</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #274648 Flags</td>
<td>review?
</td>
<td>review+
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Use Region instead of IntRect in PageClient and WebPageProxy setViewNeedsDisplay method"
href="https://bugs.webkit.org/show_bug.cgi?id=155747#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Use Region instead of IntRect in PageClient and WebPageProxy setViewNeedsDisplay method"
href="https://bugs.webkit.org/show_bug.cgi?id=155747">bug 155747</a>
from <span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=274648&action=diff" name="attach_274648" title="Patch">attachment 274648</a> <a href="attachment.cgi?id=274648&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=274648&action=review">https://bugs.webkit.org/attachment.cgi?id=274648&action=review</a>
<span class="quote">> Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp:73
> + RefPtr<cairo_region_t> damageRegion = adoptRef(cairo_region_create());
> + auto rects = region.rects();
> + for (const auto& rect : rects) {
> + cairo_rectangle_int_t damageRect = rect;
> + cairo_region_union_rectangle(damageRegion.get(), &damageRect);
> + }</span >
This is “make a cairo_region_t out of a WebCore::Region” and it should do that as efficiently as possible. I think that belongs as a separate function, not nested inside PageClientImpl::setViewNeedsDisplay.
<span class="quote">> Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp:237
> + damageRegion.unite(IntRect(IntPoint(), m_webPageProxy.viewSize()));</span >
Should use the constructor here instead of unite.
<span class="quote">> Source/WebKit2/UIProcess/efl/WebView.cpp:416
> + auto rects = region.rects();
> + for (const auto& rect : rects)
> + m_client.viewNeedsDisplay(this, rect);</span >
No reason for the local variable.
for (auto& rect : region.rects())</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>