Summary: | Clean up some code in SharedDisplayListHandle | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Wenson Hsieh <wenson_hsieh> | ||||||
Component: | WebKit2 | Assignee: | 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
Wenson Hsieh
2020-11-18 08:22:05 PST
Created attachment 414452 [details]
Patch
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 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). 👍🏻 Created attachment 414457 [details]
Patch
Committed r269969: <https://trac.webkit.org/changeset/269969> All reviewed patches have been landed. Closing bug and clearing flags on attachment 414457 [details]. |