-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 68eec7e. rdar://problem/113608292
Cherry-pick bc52720. rdar://problem/111934640 Path::transform() should not trigger creation of a platform path https://bugs.webkit.org/show_bug.cgi?id=258759 rdar://problem/111934640 Reviewed by Simon Fraser. Many paths consist only of Move/Line/Quadratic/Cubic/Close segments, which are all simple to apply an AffineTransform to. Transform single segment and PathStream based paths in place when Path::transform() is called, to avoid the overhead of generating a CGPath. If other segment types are in the path, continue to convert to a platform path first. Some WPT (path + transform) tests fail on GTK ports because the tests are fragile to floating point calculations. The tests rotate the context by 90 degree and scale it by 283 then they stroke a line to cover the whole canvas by the stroke color. If we scale by 282, the last row in the canvas will not be stroked even without this patch. On GKT port and with this patch, the last row is stroked but it is anti-aliased with the background. * LayoutTests/platform/glib/TestExpectations: * Source/WebCore/platform/graphics/Path.cpp: (WebCore::Path::transform): * Source/WebCore/platform/graphics/PathImpl.h: * Source/WebCore/platform/graphics/PathSegment.cpp: (WebCore::PathSegment::canTransform const): (WebCore::PathSegment::transform): * Source/WebCore/platform/graphics/PathSegment.h: * Source/WebCore/platform/graphics/PathSegmentData.cpp: (WebCore::PathMoveTo::transform): (WebCore::PathLineTo::transform): (WebCore::PathQuadCurveTo::transform): (WebCore::PathBezierCurveTo::transform): (WebCore::PathDataLine::transform): (WebCore::PathDataQuadCurve::transform): (WebCore::PathDataBezierCurve::transform): (WebCore::PathCloseSubpath::transform): * Source/WebCore/platform/graphics/PathSegmentData.h: * Source/WebCore/platform/graphics/PathStream.cpp: (WebCore::PathStream::transform): * Source/WebCore/platform/graphics/PathStream.h: * Source/WebCore/platform/graphics/cairo/PathCairo.cpp: (WebCore::PathCairo::transform): * Source/WebCore/platform/graphics/cairo/PathCairo.h: * Source/WebCore/platform/graphics/cg/PathCG.cpp: (WebCore::PathCG::transform): * Source/WebCore/platform/graphics/cg/PathCG.h: Canonical link: https://commits.webkit.org/266672@main Identifier: 265870.311@safari-7616.1.27.10-branch Canonical link: https://commits.webkit.org/265870.347@safari-7616-branch
- Loading branch information
Showing
13 changed files
with
216 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.