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.
rdar://116090971
Pull request: https://github.com/WebKit/WebKit/pull/18293