-
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 271354@main (a8f57b1). rdar://119334889
GraphicsContextCG should clip the paths via CGContext in GPUP mode https://bugs.webkit.org/show_bug.cgi?id=252833 rdar://105835901 Reviewed by Said Abou-Hallawa. Construct the clipped path directly into the CGContext. Instead of creating a CGPath object, add the path info upon need to the CGContext. Removes some of CG work in GPUP receive side where time is spent just copying the CGPath objects. The implementation has now duplicated logic: - Add path segments to CGPath via PathCG - Add path segments to CGContext path The implementation of both are stored next to each other so that they keep in sync. * Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::setCGContextPath): (WebCore::drawPathWithCGContext): (WebCore::GraphicsContextCG::drawNativeImageInternal): (WebCore::GraphicsContextCG::drawPattern): (WebCore::GraphicsContextCG::drawPath): (WebCore::GraphicsContextCG::fillPath): (WebCore::GraphicsContextCG::strokePath): (WebCore::GraphicsContextCG::fillRect): (WebCore::GraphicsContextCG::fillRectWithRoundedHole): (WebCore::GraphicsContextCG::clipOut): (WebCore::GraphicsContextCG::clipPath): (WebCore::GraphicsContextCG::beginTransparencyLayer): (WebCore::GraphicsContextCG::drawLinesForText): * Source/WebCore/platform/graphics/cg/PathCG.cpp: (WebCore::addToContextPath): (WebCore::copyClosingSubpathsApplierFunction): (WebCore::addToCGContextPath): * Source/WebCore/platform/graphics/cg/PathCG.h: Canonical link: https://commits.webkit.org/271354@main Canonical link: https://commits.webkit.org/267815.633@safari-7617-branch
- Loading branch information
1 parent
b4db56f
commit c10cd41
Showing
3 changed files
with
177 additions
and
58 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
Oops, something went wrong.