Bug 255898 - [GPU Process] Create a platform path only when it is needed
Summary: [GPU Process] Create a platform path only when it is needed
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-04-24 17:52 PDT by Said Abou-Hallawa
Modified: 2023-06-30 19:44 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2023-04-24 17:52:55 PDT
When GPUProcess is enabled, a platform path is created in the WebProcess mainly to store the path segments. A path segment is a command added to the Path. When the Path is encoded, the platform path is flattened back to path segments and they are sent to GPUProcess. Upon received the path segments, the GPUProcess creates another platform path to store the decoded path segment.

We should avoid creating the platform path in the WebProcess. For this purpose a new class called PathStream is created. It is a superclass of PathImpl which is the base class of the platform path (PathCG and PathCairo). Path now owns a unique_ptr<PathImpl> which can be converted from PathStream to PathCG and vice versa. Path delegates all the calls to PathImpl. PathStream will implement most of the functions the Path needs. But for drawing and complicated queries, the PathStream will be connoted to PathCG.
Comment 1 Radar WebKit Bug Importer 2023-04-24 17:53:16 PDT
<rdar://problem/108480395>
Comment 2 Said Abou-Hallawa 2023-04-24 18:15:13 PDT
Pull request: https://github.com/WebKit/WebKit/pull/13126
Comment 3 EWS 2023-06-27 17:16:56 PDT
Committed 265569@main (f90cae5f62c3): <https://commits.webkit.org/265569@main>

Reviewed commits have been landed. Closing PR #13126 and removing active labels.