Hacker News new | ask | show | jobs
by Kiro 2090 days ago
I'm dealing with a Firefox issue where painting on canvas with a CSS filter is magnitudes slower than Chrome. It makes my app almost unusable for Firefox users. Improving the performance would certainly make users notice since it's one of the most common complaints.
1 comments

Stuff like CSS filters is generally going to be down to lack of GPU acceleration or video driver shenanigans, though some obscure filters still run on the CPU. If you run a filter on the entire page for example (some addons do this) it pessimizes rendering in a bad, noticeable way.
In this link about a similar (or same?) issue it sounds like filters are done on the CPU in Firefox unless you enable a flag but it may be outdated: https://bugzilla.mozilla.org/show_bug.cgi?id=925025

> Safari and Chrome both do blur on the GPU Firefox does it in software unless WebRender is turned on. You could try turning on the gfx.webrender.all pref and that should improve things.

webrender is on by default for Windows 10, but Mozilla is still struggling with mac and Linux drivers, so it's still off by default there.

See https://wiki.mozilla.org/Platform/GFX/WebRender_Where

To check if you're using webrender, check about:support. Check the graphics>compositing section.

(Edited to correct first paragraph.)

In the Firefox Release channel, WebRender is currently only enabled on Windows 10. Windows 7/8 support should be coming soon in Firefox 83 (2020-11-17) and macOS and Linux after that. As you say, GPU drivers are the biggest problem.
It is changing, though.

I have an Intel video card (UHD 630), and Webrender (which I had to forcibly enable) is working very well. Video acceleration, too. Even with a 4K screen.