Bug 148441 - Construct default winding string arguments in CanvasRenderingContext2D from ASCIILiteral objects
Summary: Construct default winding string arguments in CanvasRenderingContext2D from A...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-25 12:17 PDT by Zan Dobersek
Modified: 2015-09-02 09:49 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.41 KB, patch)
2015-08-25 12:21 PDT, Zan Dobersek
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2015-08-25 12:17:29 PDT
Construct default winding string arguments in CanvasRenderingContext2D from ASCIILiteral objects
Comment 1 Zan Dobersek 2015-08-25 12:21:16 PDT
Created attachment 259870 [details]
Patch
Comment 2 Darin Adler 2015-08-25 13:25:47 PDT
Comment on attachment 259870 [details]
Patch

This is a slight optimization. Could optimize even more by overloading instead so we wouldn’t even have to allocate/destroy a StringImpl each time.
Comment 3 Zan Dobersek 2015-09-02 07:15:08 PDT
At least this case could be improved by generating better bindings code. There the string value is already tested to throw a type error if it doesn't equal either 'nonzero' or 'evenodd', so it would then just be a matter of passing an enum value to the implementation function.
Comment 4 Zan Dobersek 2015-09-02 09:49:37 PDT
Committed r189248: <http://trac.webkit.org/changeset/189248>