Bug 262198
| Summary: | [CG] Add the path segments directly to the CGContext instead of creating a CGPath then adding it | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> |
| Component: | Layout and Rendering | Assignee: | Said Abou-Hallawa <sabouhallawa> |
| Status: | NEW | ||
| Severity: | Normal | CC: | bfulgham, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Said Abou-Hallawa
If the Path is represented as PathStream, it is better to directly add these segments to the CGContext instead of creating a CGPath then adding the CGPath to the CGContext. CGContextBeginPath() creates a CGPath to receive the PathSegments to the intermediate CGPath.
With GPUProcess and before 265569@main we used to create three CGPaths when calling GraphicsContext::fillPath() for example:
1. The first we create to hold the PathSegments in WebProcess
2. The second is created when decoding the PathSegments in GPUProcess
3. The third is created by CGContextBeginPath() to receive the second CGPath
After 265569@main, the first CGPath is eliminated because the PathSegments are now stored as PathStream and it can be use for encoding and decoding the Path.
With this change, we can eliminate the second one also.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Said Abou-Hallawa
rdar://116090971
Said Abou-Hallawa
Pull request: https://github.com/WebKit/WebKit/pull/18293