CSS blur effects are highly inefficient and very slow in canvas filters (Sister bug of Chrome bug #726143).
Categories
(Core :: Graphics: Canvas2D, defect, P4)
Tracking
()
People
(Reporter: patrick.martin.r, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: parity-edge, perf)
Attachments
(1 obsolete file)
Reporter | ||
Comment 1•6 years ago
|
||
![]() |
||
Comment 2•6 years ago
|
||
Reporter | ||
Comment 3•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Reporter | ||
Comment 5•6 years ago
|
||
Reporter | ||
Comment 6•6 years ago
|
||
Reporter | ||
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 9•6 years ago
|
||
Reporter | ||
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
I also am noticing an extreme performance degradation when using CSS filters. It doesn't matter if the filter is applied in the Javascript canvas context or in CSS directly.
See a very simple example here: https://codepen.io/anon/pen/NoJwJR
Comment 12•6 years ago
|
||
(In reply to chrisc from comment #11)
I also am noticing an extreme performance degradation when using CSS filters. It doesn't matter if the filter is applied in the Javascript canvas context or in CSS directly.
See a very simple example here: https://codepen.io/anon/pen/NoJwJR
Profile: https://perfht.ml/2V264sA
Reporter | ||
Comment 13•4 years ago
|
||
Any updates on this? Here's an updated link to a more extreme case: https://about.ilovepie.dev/test_blur/
Reporter | ||
Comment 14•4 years ago
|
||
it does seem that performance has improved somewhat since i last checked though.
Comment 15•3 years ago
|
||
(In reply to Patrick Martin from comment #14)
it does seem that performance has improved somewhat since i last checked though.
Good enough to close?
Reporter | ||
Comment 16•3 years ago
|
||
I haven't tested this in a while, as far as I know though, the algorithms used in gaussian blurring for CSS filters are still very slow compared with some other implementations out there (for example the Gaussian blur implementation in libass) and force the canvas to use software rendering. I've had to work around it using a WebGL shader that implements Gaussian blur. What i would suggest is a simple test case with 4 or five spinning rectangles that are drawn in canvas 2D using the Gaussian blur filter with a large sigma (> 80) that overlap each other. That should demonstrate the issue. I'll fix the link i posted in comment 13 and re link it in a bit.
Updated•2 years ago
|
Reporter | ||
Comment 17•1 year ago
|
||
This could be fixed by using SIMD when not using the GPU. It's been a while since I have checked CSS bluring's performance as I have since switched to using WebGL for my blur needs so someone might want to reverify this.
Updated•1 year ago
|
Comment 19•3 months ago
|
||
I will dupe it over to bug 1912897
Description
•