RESOLVED FIXED225424
DisplayList::Recorder::canAppendItemOfType shouldn't be responsible for appending context state change items
https://bugs.webkit.org/show_bug.cgi?id=225424
Summary DisplayList::Recorder::canAppendItemOfType shouldn't be responsible for appen...
Cameron McCormack (:heycam)
Reported 2021-05-05 17:07:16 PDT
It's non-obvious from the name that canAppendItemOfType can also end up appending an item. So let's split out the context state change item out into a separate function.
Attachments
Patch (5.06 KB, patch)
2021-05-05 17:16 PDT, Cameron McCormack (:heycam)
no flags
Patch (5.23 KB, patch)
2021-05-06 00:33 PDT, Cameron McCormack (:heycam)
no flags
Cameron McCormack (:heycam)
Comment 1 2021-05-05 17:16:09 PDT
Simon Fraser (smfr)
Comment 2 2021-05-05 20:01:55 PDT
Comment on attachment 427824 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427824&action=review > Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:124 > bool Recorder::canAppendItemOfType(ItemType type) This function can now be const. > Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:129 > +void Recorder::appendStateChangeItemIfStateHasChanged() Usually we say "IfNecessary" > Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:131 > + GraphicsContextStateChange& stateChanges = currentState().stateChange; auto& > Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:132 > + GraphicsContextState::StateChangeFlags changesFromLastState = stateChanges.changesFromState(currentState().lastDrawingState); auto
Cameron McCormack (:heycam)
Comment 3 2021-05-06 00:33:38 PDT
EWS
Comment 4 2021-05-06 01:53:00 PDT
Committed r277075 (237378@main): <https://commits.webkit.org/237378@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 427855 [details].
Radar WebKit Bug Importer
Comment 5 2021-05-06 01:53:13 PDT
Note You need to log in before you can comment on or make changes to this bug.