| Summary: | [GPU Process] Unique RenderingResourceIdentifiers Part 8: Consolidate DisplayList::ResourceHeap | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> | ||||||||||||||
| Component: | Layout and Rendering | Assignee: | Myles C. Maxfield <mmaxfield> | ||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||
| Severity: | Normal | CC: | annulen, bfulgham, ews-watchlist, gyuyoung.kim, ryuan.choi, sergio, simon.fraser, webkit-bug-importer, zalan | ||||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||||
| Hardware: | Unspecified | ||||||||||||||||
| OS: | Unspecified | ||||||||||||||||
| Bug Depends on: | |||||||||||||||||
| Bug Blocks: | 217638 | ||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Myles C. Maxfield
2021-10-07 21:51:13 PDT
Created attachment 440573 [details]
Patch
Created attachment 440574 [details]
Patch
Comment on attachment 440574 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=440574&action=review > Source/WebCore/platform/graphics/displaylists/DisplayListResourceHeap.h:44 > + using ImageBufferHashMap = HashMap<RenderingResourceIdentifier, Ref<ImageBuffer>>; > + using NativeImageHashMap = HashMap<RenderingResourceIdentifier, Ref<NativeImage>>; > + using FontRenderingResourceMap = HashMap<RenderingResourceIdentifier, Ref<Font>>; > + > + ResourceHeap() = default; These are unnecessary. Created attachment 440575 [details]
Patch
Created attachment 440639 [details]
Patch
Comment on attachment 440639 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=440639&action=review > Source/WebCore/platform/graphics/displaylists/DisplayListResourceHeap.h:115 > + HashMap<RenderingResourceIdentifier, Ref<ImageBuffer>> m_imageBuffers; > + HashMap<RenderingResourceIdentifier, Ref<NativeImage>> m_nativeImages; > + HashMap<RenderingResourceIdentifier, Ref<Font>> m_fonts; Did you consider HashMap<RenderingResourceIdentifier, Variant<....>> ? An identifier will never be shared between these types, right? Comment on attachment 440639 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=440639&action=review >> Source/WebCore/platform/graphics/displaylists/DisplayListResourceHeap.h:115 >> + HashMap<RenderingResourceIdentifier, Ref<Font>> m_fonts; > > Did you consider HashMap<RenderingResourceIdentifier, Variant<....>> ? An identifier will never be shared between these types, right? ``` static_assert failed: For conversion construction of variants, exactly one type must be constructible ``` 😭 Comment on attachment 440639 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=440639&action=review >>> Source/WebCore/platform/graphics/displaylists/DisplayListResourceHeap.h:115 >>> + HashMap<RenderingResourceIdentifier, Ref<Font>> m_fonts; >> >> Did you consider HashMap<RenderingResourceIdentifier, Variant<....>> ? An identifier will never be shared between these types, right? > > ``` > static_assert failed: For conversion construction of variants, exactly one type must be constructible > ``` > > 😭 Whoops, ignore that, I got it to work. Created attachment 440892 [details]
Patch for committing
Created attachment 440897 [details]
Patch for committing
Committed r283971 (242818@main): <https://commits.webkit.org/242818@main> |