Bug 223849

Summary: [GPU Process] Simplify DisplayList::Iterator part 1: Require encoding/decoding delegates for non-inline display list items
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, cdumez, changseok, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, kondapallykalyan, pdr, ryuan.choi, sergio, simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 223560    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
wenson_hsieh: review+
Patch for committing none

Description Myles C. Maxfield 2021-03-28 01:37:12 PDT
[GPU Process] Simplify DisplayList::Iterator part 1: Require encoding/decoding delegates for non-inline display list items
Comment 1 Myles C. Maxfield 2021-03-28 01:49:16 PDT
Created attachment 424486 [details]
Patch
Comment 2 Myles C. Maxfield 2021-03-28 13:46:03 PDT
Created attachment 424508 [details]
Patch
Comment 3 Myles C. Maxfield 2021-03-28 20:01:36 PDT
Created attachment 424519 [details]
Patch
Comment 4 Wenson Hsieh 2021-03-28 22:08:59 PDT
Comment on attachment 424519 [details]
Patch

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

> Source/WebCore/html/HTMLCanvasElement.cpp:49
> +#include "InMemoryDisplayList.h"

Do we need this include?

> Source/WebCore/platform/graphics/displaylists/InMemoryDisplayList.cpp:64
> +    for (auto iterator = this->begin(); iterator != end; ++iterator) {

Can we just do something like `for (auto [item, extent, size] : *this) { …` here instead?

> Source/WebCore/platform/graphics/displaylists/InMemoryDisplayList.h:55
> +    std::unique_ptr<ItemBufferWritingClient> m_writingClient;
> +    std::unique_ptr<ItemBufferReadingClient> m_readingClient;

Should these be of type `InMemoryDisplayList::WritingClient` and `InMemoryDisplayList::ReadingClient`? (i.e. do we expect these to be set to non-in-memory clients)?
Comment 5 Myles C. Maxfield 2021-03-28 22:20:57 PDT
Created attachment 424523 [details]
Patch
Comment 6 Myles C. Maxfield 2021-03-28 23:30:17 PDT
Created attachment 424527 [details]
Patch
Comment 7 Wenson Hsieh 2021-04-02 08:22:07 PDT
Comment on attachment 424527 [details]
Patch

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

> Source/WebCore/platform/graphics/displaylists/DisplayListImageBuffer.h:59
> +        m_drawingContext.displayList().setItemBufferClient(m_writingClient.get());
> +        m_drawingContext.displayList().setItemBufferClient(m_readingClient.get());

It looks like this needs to be updated after the recent renaming.
Comment 8 Myles C. Maxfield 2021-04-02 14:48:34 PDT
Created attachment 425057 [details]
Patch for committing
Comment 9 Radar WebKit Bug Importer 2021-04-04 21:22:44 PDT
<rdar://problem/76205069>
Comment 10 EWS 2021-04-05 17:22:08 PDT
Committed r275459: <https://commits.webkit.org/r275459>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 425057 [details].