Bug 217496

Summary: [MotionMark] Add a fast path for GraphicsContext::strokePath in the case where the path is a line
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: CanvasAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, sabouhallawa, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Wenson Hsieh 2020-10-08 15:32:53 PDT
With GPU process (for canvas) enabled, this improves performance by roughly 20-25% on the Canvas Lines subtest.
Comment 1 Wenson Hsieh 2020-10-08 15:45:01 PDT
Created attachment 410892 [details]
Patch
Comment 2 Tim Horton 2020-10-08 15:59:40 PDT
We should do the multiple only-lineto case too, someday.
Comment 3 Wenson Hsieh 2020-10-08 17:49:37 PDT
Comment on attachment 410892 [details]
Patch

(In reply to Tim Horton from comment #2)
> We should do the multiple only-lineto case too, someday.

Indeed! We should be able to do this for paths consisting of up to 3 line segments (without bumping the current size of the InlinePathData variant).
Comment 4 EWS 2020-10-08 18:17:51 PDT
Committed r268240: <https://trac.webkit.org/changeset/268240>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 410892 [details].
Comment 5 Radar WebKit Bug Importer 2020-10-08 18:18:18 PDT
<rdar://problem/70120461>