Bug 219089 - Clean up some code in SharedDisplayListHandle
Summary: Clean up some code in SharedDisplayListHandle
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks: 219091
  Show dependency treegraph
 
Reported: 2020-11-18 08:22 PST by Wenson Hsieh
Modified: 2020-11-18 10:43 PST (History)
4 users (show)

See Also:


Attachments
Patch (7.01 KB, patch)
2020-11-18 08:26 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (6.83 KB, patch)
2020-11-18 10:01 PST, 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-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>