Bug 217539 - [GPU Process] Mechanical cleanup in DisplayListRecorder
Summary: [GPU Process] Mechanical cleanup in DisplayListRecorder
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
Keywords: InRadar
Depends on:
Blocks: 217506
  Show dependency treegraph
Reported: 2020-10-09 16:13 PDT by Myles C. Maxfield
Modified: 2020-10-09 17:09 PDT (History)
2 users (show)

See Also:

Patch (13.07 KB, patch)
2020-10-09 16:14 PDT, Myles C. Maxfield
sam: review+
Details | Formatted Diff | Diff
Patch for committing (13.63 KB, patch)
2020-10-09 16:33 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2020-10-09 16:13:00 PDT
[GPU Process] Mechanical cleanup in DisplayListRecorder
Comment 1 Myles C. Maxfield 2020-10-09 16:14:16 PDT
Created attachment 410980 [details]
Comment 2 Sam Weinig 2020-10-09 16:27:21 PDT
Comment on attachment 410980 [details]

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)));
Comment 3 Myles C. Maxfield 2020-10-09 16:33:58 PDT
Created attachment 410982 [details]
Patch for committing
Comment 4 EWS 2020-10-09 17:08:20 PDT
Committed r268300: <https://trac.webkit.org/changeset/268300>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 410982 [details].
Comment 5 Radar WebKit Bug Importer 2020-10-09 17:09:19 PDT