Open
Bug 762973
Opened 12 years ago
Updated 2 years ago
All Canvas2d globalCompositeOperations except "source-over" are very slow
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
NEW
People
(Reporter: gbarnett, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [games:p?])
Attachments
(1 file)
(deleted),
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19
Steps to reproduce:
Went to http://jsperf.com/canvas-global-composite-operations
Actual results:
The "source-atop" test achieved over 248,000 ops/sec.
Every other global composite operation achieved under 2,000 ops/sec
Expected results:
The other GCO's should have achieved higher than 2,000; in Firefox 11, they most achieved in the 60,000 range (see attached graph)
This issue affects FF 12 and FF 13
Reporter | ||
Updated•12 years ago
|
Summary: All Canvas2d globalCompositeOperations except "source-atop" are very slow in FF12 → All Canvas2d globalCompositeOperations except "source-atop" are very slow in FF12 and FF13
Reporter | ||
Updated•12 years ago
|
Summary: All Canvas2d globalCompositeOperations except "source-atop" are very slow in FF12 and FF13 → All Canvas2d globalCompositeOperations except "source-over" are very slow in FF12 and FF13
Reporter | ||
Comment 1•12 years ago
|
||
Oops, I said "source-atop", but meant "source-over"
"source-over" is the default, and the one that's really fast.
Comment 2•12 years ago
|
||
I use "lighter" extensively because it's the only remotely efficient way to approximate the GL_MULTIPLY blend equation in canvas. IIRC based on discussions with the GFX guys this problem is caused by Direct2D not exposing any control over blend operations, so any non-source-atop blend operation requires an expensive Direct3D fallback.
Reporter | ||
Updated•12 years ago
|
Hardware: x86_64 → x86
Updated•12 years ago
|
Component: Untriaged → Canvas: 2D
Product: Firefox → Core
QA Contact: untriaged → canvas.2d
Comment 3•12 years ago
|
||
For a real-world example, the level editor in http://playescapegoat.com/ gets absolutely murdered by this. Even caching the rendered output isn't enough.
Updated•12 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•12 years ago
|
Blocks: gecko-games
Updated•12 years ago
|
Summary: All Canvas2d globalCompositeOperations except "source-over" are very slow in FF12 and FF13 → All Canvas2d globalCompositeOperations except "source-over" are very slow
Updated•12 years ago
|
Whiteboard: [games:p2]
Note: This is still slow with Firefox 23 + Direct2D/Azure canvas.
Comment 5•11 years ago
|
||
Note also: CompositeOperations like "lighter" works pretty fast in other browsers like Chrome. It would be a nice feature for particle effects.
Updated•11 years ago
|
Version: 13 Branch → Trunk
Comment 6•10 years ago
|
||
This is still an issue.
I've checked the original test case at http://jsperf.com/canvas-global-composite-operations
Current beta (38.0.5) renders all composition modes other than "source-over" at 4% of the speed of "source-over".
In contrast, Chrome 42 renders at 40%-70% of the speed of "source-over" (which is 10% faster than Firefox on same PC anyway).
Thus, Chrome renders upto 10-20 times faster.
Whiteboard: [games:p2] → [games:p?]
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•