DescriptionPack StyleColor members in StyleRareInheritedData tighter to save memory
Since StyleColor stores the color value (32-bit RGBA) plus a single flag,
it is a bit inefficient. In particular when multiple StyleColor objects
are members of another object, there will be a lot of unnecessary padding.
This padding can be avoided by storing the color value and the flag as
separate members of the containing structure, which allows the flags to
be packed into a bitfield.
The actual saving from this change, measured in a 64-bit Linux build, is
20 bytes per StyleRareInheritedData object.
BUG=356124
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170038
Patch Set 1 #Patch Set 2 : Simpler approach #Patch Set 3 : Fix initial isCurrentColor valuse #
Messages
Total messages: 20 (0 generated)
|