[webkit-changes] [WebKit/WebKit] c9b0bf: Path::applyElements() should not trigger creation ...
Said Abou-Hallawa
noreply at github.com
Thu Aug 3 18:41:40 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c9b0bf147c95ffa9390e93b6b784e28ada34bc9f
https://github.com/WebKit/WebKit/commit/c9b0bf147c95ffa9390e93b6b784e28ada34bc9f
Author: Said Abou-Hallawa <said at apple.com>
Date: 2023-08-03 (Thu, 03 Aug 2023)
Changed paths:
M Source/WebCore/platform/graphics/Path.cpp
M Source/WebCore/platform/graphics/PathImpl.h
M Source/WebCore/platform/graphics/PathSegment.cpp
M Source/WebCore/platform/graphics/PathSegment.h
M Source/WebCore/platform/graphics/PathSegmentData.h
M Source/WebCore/platform/graphics/PathStream.cpp
M Source/WebCore/platform/graphics/PathStream.h
M Source/WebCore/platform/graphics/cairo/PathCairo.cpp
M Source/WebCore/platform/graphics/cairo/PathCairo.h
M Source/WebCore/platform/graphics/cg/PathCG.cpp
M Source/WebCore/platform/graphics/cg/PathCG.h
Log Message:
-----------
Path::applyElements() should not trigger creation of a platform path for simple segments
https://bugs.webkit.org/show_bug.cgi?id=259795
rdar://113355740
Reviewed by Simon Fraser.
Allow enumrating PathStream if it consist only of Move/Line/Quadratic/Cubic/Close
segments without creating the platform path.
Transform single segment and PathStream-based paths in place when applyElements()
is called, to avoid the overhead of generating a platform path. If other segment
types are in the path, continue to convert to a platform path first.
* Source/WebCore/platform/graphics/Path.cpp:
(WebCore::Path::closeSubpath):
(WebCore::Path::applyElements const):
* Source/WebCore/platform/graphics/PathImpl.h:
* Source/WebCore/platform/graphics/PathSegment.cpp:
(WebCore::PathSegment::canApplyElements const):
(WebCore::PathSegment::applyElements const):
* Source/WebCore/platform/graphics/PathSegment.h:
* Source/WebCore/platform/graphics/PathSegmentData.h:
(WebCore::PathArcTo::applyElements const): Deleted.
(WebCore::PathArc::applyElements const): Deleted.
(WebCore::PathEllipse::applyElements const): Deleted.
(WebCore::PathEllipseInRect::applyElements const): Deleted.
(WebCore::PathRect::applyElements const): Deleted.
(WebCore::PathRoundedRect::applyElements const): Deleted.
(WebCore::PathDataArc::applyElements const): Deleted.
* Source/WebCore/platform/graphics/PathStream.cpp:
(WebCore::PathStream::applyElements const):
* Source/WebCore/platform/graphics/PathStream.h:
* Source/WebCore/platform/graphics/cairo/PathCairo.cpp:
(WebCore::PathCairo::applyElements const):
* Source/WebCore/platform/graphics/cairo/PathCairo.h:
* Source/WebCore/platform/graphics/cg/PathCG.cpp:
(WebCore::PathCG::applyElements const):
* Source/WebCore/platform/graphics/cg/PathCG.h:
Canonical link: https://commits.webkit.org/266564@main
More information about the webkit-changes
mailing list