[webkit-reviews] review granted: [Bug 217539] [GPU Process] Mechanical cleanup in DisplayListRecorder : [Attachment 410980] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 9 16:27:21 PDT 2020

Sam Weinig <sam at webkit.org> has granted Myles C. Maxfield
<mmaxfield at apple.com>'s request for review:
Bug 217539: [GPU Process] Mechanical cleanup in DisplayListRecorder

Attachment 410980: Patch


--- Comment #2 from Sam Weinig <sam at webkit.org> ---
Comment on attachment 410980
  --> https://bugs.webkit.org/attachment.cgi?id=410980

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

> Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:381
> +    DrawingItem& newItem = downcast<DrawingItem>(appendItem(WTFMove(item)));
> +    updateItemExtent(newItem);

auto would good here.

If you wanted to, I would also consider making Recorder::appendItem a template
function so that the downcast is not needed for callers of appendItem.

template<typename ItemType>
ItemType& Recorder::appendItem(Ref<ItemType>&& item)
    return downcast<ItemType>(m_displayList.append(WTFMove(item)));

More information about the webkit-reviews mailing list