-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[SVG] Add strokeContains fast path #19330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SVG] Add strokeContains fast path #19330
Conversation
|
EWS run on previous version of this PR (hash 7fd4966) Details
|
7fd4966 to
89ec2fa
Compare
|
EWS run on previous version of this PR (hash 89ec2fa) Details
|
89ec2fa to
bb2f030
Compare
|
EWS run on previous version of this PR (hash bb2f030) Details
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL stroke-miterlimit actually applies to rect and not just path, line, and polygon!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is now out of date and I think we can remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! Removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
bb2f030 to
d468c64
Compare
|
EWS run on current version of this PR (hash d468c64) Details
|
https://bugs.webkit.org/show_bug.cgi?id=263430 rdar://problem/117439322 Reviewed by Cameron McCormack. This is one step of the patch series implementing approximate repainting rect for SVG path, derived from blink's work[1]. This patch adds strokeContains optimization. The key is that we can use approximateStrokeBoundingBox to filter out the candidates Instead of strokeBoundingBox since approximateStrokeBoundingBox is always larger than strokeBoundingBox. And approximateStrokeBoundingBox is incredibly faster than strokeBoundingBox. We also extend our fast path handling for SVG Rect. [1]: https://bugs.chromium.org/p/chromium/issues/detail?id=435097 * Source/WebCore/rendering/svg/legacy/LegacyRenderSVGEllipse.cpp: (WebCore::LegacyRenderSVGEllipse::updateShapeFromElement): * Source/WebCore/rendering/svg/legacy/LegacyRenderSVGPath.cpp: (WebCore::LegacyRenderSVGPath::updateShapeFromElement): * Source/WebCore/rendering/svg/legacy/LegacyRenderSVGRect.cpp: (WebCore::LegacyRenderSVGRect::updateShapeFromElement): (WebCore::LegacyRenderSVGRect::canUseStrokeHitTestFastPath const): (WebCore::LegacyRenderSVGRect::definitelyHasSimpleStroke const): (WebCore::LegacyRenderSVGRect::shapeDependentStrokeContains): (WebCore::LegacyRenderSVGRect::shapeDependentFillContains const): * Source/WebCore/rendering/svg/legacy/LegacyRenderSVGRect.h: * Source/WebCore/rendering/svg/legacy/LegacyRenderSVGShape.cpp: (WebCore::LegacyRenderSVGShape::strokeContains): (WebCore::LegacyRenderSVGShape::approximateStrokeBoundingBox const): (WebCore::LegacyRenderSVGShape::updateRepaintBoundingBox): (WebCore::LegacyRenderSVGShape::hasSmoothStroke const): Deleted. * Source/WebCore/rendering/svg/legacy/LegacyRenderSVGShape.h: Canonical link: https://commits.webkit.org/269745@main
d468c64 to
95809c7
Compare
|
Committed 269745@main (95809c7): https://commits.webkit.org/269745@main Reviewed commits have been landed. Closing PR #19330 and removing active labels. |
🛠 tv-sim
95809c7
d468c64
🧪 ios-wk2-wpt🧪 gtk-wk2🧪 api-ios🧪 api-gtk🧪 mac-AS-debug-wk2