Changeset 275483 in webkit
- Timestamp:
- Apr 5, 2021 8:08:15 PM (3 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r275481 r275483 1 2021-04-05 Simon Fraser <simon.fraser@apple.com> 2 3 Wasted vector capacity in SVGPathByteStream 4 https://bugs.webkit.org/show_bug.cgi?id=224165 5 6 Reviewed by Said Abou-Hallawa. 7 8 On youtube.com, about 50KB of vector capacity is wasted in SVGPathByteStream, 9 so shrink them after parsing. 10 11 * svg/SVGPathByteStream.h: 12 (WebCore::SVGPathByteStream::shrinkToFit): 13 * svg/SVGPathParser.cpp: 14 (WebCore::SVGPathParser::parseToByteStream): 15 1 16 2021-04-05 Simon Fraser <simon.fraser@apple.com> 2 17 -
trunk/Source/WebCore/svg/SVGPathByteStream.h
r248846 r275483 98 98 bool isEmpty() const { return m_data.isEmpty(); } 99 99 unsigned size() const { return m_data.size(); } 100 void shrinkToFit() { m_data.shrinkToFit(); } 100 101 101 102 private: -
trunk/Source/WebCore/svg/SVGPathParser.cpp
r263334 r275483 44 44 { 45 45 SVGPathByteStreamBuilder builder(byteStream); 46 return parse(source, builder, mode, checkForInitialMoveTo); 46 auto result = parse(source, builder, mode, checkForInitialMoveTo); 47 byteStream.shrinkToFit(); 48 return result; 47 49 } 48 50
Note: See TracChangeset
for help on using the changeset viewer.