[webkit-changes] [WebKit/WebKit] 816bae: Add back inline storage to WebCore::Path
Cameron McCormack
noreply at github.com
Wed Jul 19 02:46:03 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 816baea44df683e2518b805a5dc65697c8e70492
https://github.com/WebKit/WebKit/commit/816baea44df683e2518b805a5dc65697c8e70492
Author: Cameron McCormack <heycam at apple.com>
Date: 2023-07-19 (Wed, 19 Jul 2023)
Changed paths:
M Source/WebCore/platform/graphics/Path.cpp
M Source/WebCore/platform/graphics/Path.h
M Source/WebCore/platform/graphics/PathStream.cpp
M Source/WebCore/platform/graphics/PathStream.h
M Source/WebKit/Shared/WebCoreArgumentCoders.cpp
Log Message:
-----------
Add back inline storage to WebCore::Path
https://bugs.webkit.org/show_bug.cgi?id=259326
rdar://112501668
Reviewed by Simon Fraser.
After https://commits.webkit.org/265569@main, we have three separate
heap allocations when creating a WebCore::Path with a single segment.
(The PathStream, the SegmentsData, and its Vector buffer.) These heap
allocations show up on profiles, and were part of a MotionMark Canvas
Lines regression.
* Source/WebCore/platform/graphics/Path.cpp:
(WebCore::Path::Path):
(WebCore::Path::operator=):
(WebCore::Path::operator== const):
(WebCore::Path::setImpl):
(WebCore::Path::ensurePlatformPathImpl):
(WebCore::Path::ensureImpl):
(WebCore::Path::asImpl):
(WebCore::Path::asImpl const):
(WebCore::Path::moveTo):
(WebCore::Path::asSingleMoveTo const):
(WebCore::Path::addLineTo):
(WebCore::Path::addQuadCurveTo):
(WebCore::Path::addBezierCurveTo):
(WebCore::Path::addArcTo):
(WebCore::Path::addArc):
(WebCore::Path::addEllipse):
(WebCore::Path::addEllipseInRect):
(WebCore::Path::addRect):
(WebCore::Path::addRoundedRect):
(WebCore::Path::closeSubpath):
(WebCore::Path::applySegments const):
(WebCore::Path::clear):
(WebCore::Path::singleSegment const):
(WebCore::Path::singleDataLine const):
(WebCore::Path::singleArc const):
(WebCore::Path::singleQuadCurve const):
(WebCore::Path::singleBezierCurve const):
(WebCore::Path::isEmpty const):
(WebCore::Path::segmentsIfExists const):
(WebCore::Path::isClosed const):
(WebCore::Path::currentPoint const):
(WebCore::Path::fastBoundingRect const):
(WebCore::Path::boundingRect const):
* Source/WebCore/platform/graphics/Path.h:
(WebCore::Path::singleSegmentIfExists const):
(WebCore::Path::asSingle):
(WebCore::Path::asSingle const):
* Source/WebCore/platform/graphics/PathStream.cpp:
(WebCore::PathStream::create):
(WebCore::PathStream::PathStream):
(WebCore::PathStream::addArc):
* Source/WebCore/platform/graphics/PathStream.h:
Canonical link: https://commits.webkit.org/266156@main
More information about the webkit-changes
mailing list