Open
Bug 558615
Opened 16 years ago
Updated 4 years ago
implement canvas.createColor
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
NEW
People
(Reporter: jrmuizel, Unassigned)
Details
Attachments
(1 file)
|
7.84 KB,
patch
|
Details | Diff | Splinter Review |
There's been some interest in having cheaper way of setting fillStyle and strokeStyle. The attached patch adds a canvas.createColor(r,g,b,a) that creates a canvasColor object that can be used to set fill/strokeStyle to avoid the css parsing overhead.
I've not measured the performance difference this makes yet.
Would rather not do this, though I'm not horribly against it (and it does have decent symmetry with gradients/patterns). Would need to be mozCreateColor initially as well. But, there's a patch somewhere that allows you to use an array, e.g. [0.1, 0.1, 0.2, 1.0] as a color. We could conceivably also allow integers such as 0x101010ff as colors too.
Updated•4 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•