[Webkit-unassigned] [Bug 262198] New: [CG] Add the path segments directly to the CGContext instead of creating a CGPath then adding it

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 27 10:26:02 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=262198

            Bug ID: 262198
           Summary: [CG] Add the path segments directly to the CGContext
                    instead of creating a CGPath then adding it
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sabouhallawa at apple.com
                CC: bfulgham at webkit.org, simon.fraser at apple.com,
                    zalan at apple.com

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 at 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 at 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230927/7da2498c/attachment.htm>


More information about the webkit-unassigned mailing list