[Webkit-unassigned] [Bug 155747] Use Region instead of IntRect in PageClient and WebPageProxy setViewNeedsDisplay method

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 22 09:34:56 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=155747

Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #274648|review?                     |review+
              Flags|                            |

--- Comment #2 from Darin Adler <darin at apple.com> ---
Comment on attachment 274648
  --> https://bugs.webkit.org/attachment.cgi?id=274648
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=274648&action=review

> 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);
> +    }

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.

> Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp:237
> +        damageRegion.unite(IntRect(IntPoint(), m_webPageProxy.viewSize()));

Should use the constructor here instead of unite.

> Source/WebKit2/UIProcess/efl/WebView.cpp:416
> +    auto rects = region.rects();
> +    for (const auto& rect : rects)
> +        m_client.viewNeedsDisplay(this, rect);

No reason for the local variable.

    for (auto& rect : region.rects())

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160322/fa0a1958/attachment.html>


More information about the webkit-unassigned mailing list