Bug 218259 - [Concurrent display lists] Add alternate versions of existing display list items that only contain inline data
Summary: [Concurrent display lists] Add alternate versions of existing display list it...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-27 13:50 PDT by Wenson Hsieh
Modified: 2020-10-28 12:00 PDT (History)
6 users (show)

See Also:


Attachments
Patch (54.42 KB, patch)
2020-10-27 16:53 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
For EWS (53.75 KB, patch)
2020-10-27 16:57 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Fix builds (53.88 KB, patch)
2020-10-27 17:47 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2020-10-27 13:50:19 PDT
- StrokeInlinePath
- FillInlinePath
- SetStrokeThickness
- SetInlineFillColor
- SetInlineStrokeColor
- SetInlineFillGradient
Comment 1 Wenson Hsieh 2020-10-27 16:53:10 PDT Comment hidden (obsolete)
Comment 2 Wenson Hsieh 2020-10-27 16:57:32 PDT
Created attachment 412478 [details]
For EWS
Comment 3 Wenson Hsieh 2020-10-27 17:05:41 PDT
(whoops, looks like I missed a SPECIALIZE_TYPE_TRAITS_DISPLAYLIST_ITEM for SetInlineFillGradient in this patch)
Comment 4 Wenson Hsieh 2020-10-27 17:47:12 PDT
Created attachment 412486 [details]
Fix builds
Comment 5 EWS 2020-10-27 19:09:22 PDT
Committed r269092: <https://trac.webkit.org/changeset/269092>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 412486 [details].
Comment 6 Radar WebKit Bug Importer 2020-10-27 19:10:18 PDT
<rdar://problem/70748246>
Comment 7 Sam Weinig 2020-10-28 10:45:12 PDT
Since I don't recall seeing any references to what [Concurrent display lists] are, can you please explain what this feature is, and how you intend to go about implementing it?
Comment 8 Wenson Hsieh 2020-10-28 10:52:22 PDT
(In reply to Sam Weinig from comment #7)
> Since I don't recall seeing any references to what [Concurrent display
> lists] are, can you please explain what this feature is, and how you intend
> to go about implementing it?

This "feature" is supporting concurrent generation of display list items in the web process and consumption of display list items in the GPU process.

Our overarching vision to achieve this is to make all of our display list items contain only PoD types, and store them directly in memory shared between the web and GPU processes.

Upon pushing items into shared memory in the web process, the web process will notify the GPU process, which will read items out of shared memory (and continue doing so until there are no more items left to be read).
Comment 9 Sam Weinig 2020-10-28 11:36:02 PDT
(In reply to Wenson Hsieh from comment #8)
> (In reply to Sam Weinig from comment #7)
> > Since I don't recall seeing any references to what [Concurrent display
> > lists] are, can you please explain what this feature is, and how you intend
> > to go about implementing it?
> 
> This "feature" is supporting concurrent generation of display list items in
> the web process and consumption of display list items in the GPU process.
> 
> Our overarching vision to achieve this is to make all of our display list
> items contain only PoD types, and store them directly in memory shared
> between the web and GPU processes.
> 
> Upon pushing items into shared memory in the web process, the web process
> will notify the GPU process, which will read items out of shared memory (and
> continue doing so until there are no more items left to be read).

Sounds reasonable. What is the plan for things that can't be directly encoded, like IOSurfaces?
Comment 10 Wenson Hsieh 2020-10-28 12:00:24 PDT
(In reply to Sam Weinig from comment #9)
> (In reply to Wenson Hsieh from comment #8)
> > (In reply to Sam Weinig from comment #7)
> > > Since I don't recall seeing any references to what [Concurrent display
> > > lists] are, can you please explain what this feature is, and how you intend
> > > to go about implementing it?
> > 
> > This "feature" is supporting concurrent generation of display list items in
> > the web process and consumption of display list items in the GPU process.
> > 
> > Our overarching vision to achieve this is to make all of our display list
> > items contain only PoD types, and store them directly in memory shared
> > between the web and GPU processes.
> > 
> > Upon pushing items into shared memory in the web process, the web process
> > will notify the GPU process, which will read items out of shared memory (and
> > continue doing so until there are no more items left to be read).
> 
> Sounds reasonable. What is the plan for things that can't be directly
> encoded, like IOSurfaces?

I would think IOSurfaces would exist in the GPUP already, so an identifier (and possibly some additional metadata) should be sufficient.

More generally, our current thinking is to add a special display list item that represents mapping an identifier to a resource encoded directly in shared memory, and making display list items reference the resource via the identifier.