Bug 242565

Summary: make FontCascade refcounted to make style diffing cheaper when only color has changed
Product: WebKit Reporter: Cameron McCormack (:heycam) <heycam>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Cameron McCormack (:heycam)
Reported 2022-07-09 23:09:06 PDT
When the color property is being animated, an element will get a new StyleInheritedData, since that's where color lives. The FontCasca object, which is moderately large, will be copied. We can end up spending significant time under FontCascad::operator== under RenderStyle::changeRequiresLayout and RenderText::styleDidChange, comparing identical FontCascad objects. Turning StyleInheritedData::fontCascade into a DataRef<FontCascade> would make comparison cheap when font style data is not changing.
Attachments
Radar WebKit Bug Importer
Comment 1 2022-07-09 23:09:16 PDT
Note You need to log in before you can comment on or make changes to this bug.