Bug 219089

Summary: Clean up some code in SharedDisplayListHandle
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: WebKit2Assignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: ggaren, sabouhallawa, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 219091    
Attachments:
Description Flags
Patch
none
Patch none

Description Wenson Hsieh 2020-11-18 08:22:05 PST
...
Comment 1 Wenson Hsieh 2020-11-18 08:26:42 PST
Created attachment 414452 [details]
Patch
Comment 2 Geoffrey Garen 2020-11-18 09:44:42 PST
Comment on attachment 414452 [details]
Patch

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

r=me

> Source/WebKit/Shared/SharedDisplayListHandle.h:40
> +    static constexpr size_t reservedCapacityAtStart()

We usually say "reserved capacity" to mean unused bytes. But these bytes are used -- by the DisplayListSharedMemoryHeader.

How about just calling this "headerSize"?

> Source/WebKit/Shared/SharedDisplayListHandle.h:42
> +        return roundUpToMultipleOf<sizeof(uint64_t)>(sizeof(DisplayListSharedMemoryHeader));

Slightly better to use std::max_align_t instead of sizeof(uint64_t).
Comment 3 Wenson Hsieh 2020-11-18 09:46:02 PST
Comment on attachment 414452 [details]
Patch

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

>> Source/WebKit/Shared/SharedDisplayListHandle.h:40
>> +    static constexpr size_t reservedCapacityAtStart()
> 
> We usually say "reserved capacity" to mean unused bytes. But these bytes are used -- by the DisplayListSharedMemoryHeader.
> 
> How about just calling this "headerSize"?

Sounds good! Changed to headerSize().

>> Source/WebKit/Shared/SharedDisplayListHandle.h:42
>> +        return roundUpToMultipleOf<sizeof(uint64_t)>(sizeof(DisplayListSharedMemoryHeader));
> 
> Slightly better to use std::max_align_t instead of sizeof(uint64_t).

👍🏻
Comment 4 Wenson Hsieh 2020-11-18 10:01:37 PST
Created attachment 414457 [details]
Patch
Comment 5 EWS 2020-11-18 10:42:58 PST
Committed r269969: <https://trac.webkit.org/changeset/269969>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 414457 [details].
Comment 6 Radar WebKit Bug Importer 2020-11-18 10:43:17 PST
<rdar://problem/71546202>