Summary: | Canvas: Fast-path for setting the already set color with setStrokeColor() and setFillColor() | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andreas Kling <kling> | ||||
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | darin, oliver | ||||
Priority: | P2 | Keywords: | Performance | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Andreas Kling
2010-08-09 05:01:19 PDT
Created attachment 63887 [details]
Proposed patch
The "Monster" demo mentioned in bug description: http://www.chromeexperiments.com/detail/monster/ Comment on attachment 63887 [details]
Proposed patch
Looks good.
Comment on attachment 63887 [details] Proposed patch Clearing flags on attachment: 63887 Committed r64980: <http://trac.webkit.org/changeset/64980> All reviewed patches have been landed. Closing bug. A side comment: I think it's dangerous to overload and treat floating point values as RGBA or CMYKA just based on the number of arguments. Thus, these functions should have RGBA and CMYKA in their names. Similarly, the create functions for CanvasStyle should have RGBA and CMYKA and such in their names too. The reason the functions in CanvasStyle used overloading historically is that they were constructors. Tis is one advantage of the create functions over direct calls to the constructors. We can leave the overloading trick to the constructors only. CanvasRenderingContext2D has to do this overloading because that's in the specification, but internally we should not repeat that mistake. |