Why Chrome disable GPU Rasterization if the page contains SVGs with non-convex paths

1,130 views
Skip to first unread message

Guido Villaverde

unread,
Jun 23, 2016, 1:31:12 PM6/23/16
to Chromium-discuss
Hi! 

I'm using Electron on my Macbook Pro on OSX El Capitan. And I've noticed the GPU rasterization is disabled. 
My application uses SVG icons, and it also uses d3.js (SVG) a whole lot. 
For example we are showing d3.js graphs over an HTML video. 

I'm considering forcing GPU rasterization with the --force-gpu-rasterization flag, but I'm not sure this is a good idea when using SVG a lot.

Is there a performance reason behind the decision of disabling the GPU rasterization when SVG paths are present?

Thanks!


Stephen Chenney

unread,
Jun 23, 2016, 3:57:35 PM6/23/16
to guidovi...@gmail.com, Chromium-discuss
Complex path rendering on the GPU is expensive, so Chrome has a heuristic to disable GPU path rendering when there are more than a certain number of paths and/or the paths have particular characteristics. It is deliberate and performance related.

Cheers,
Stephen.

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss


Guido Villaverde

unread,
Jun 23, 2016, 4:02:20 PM6/23/16
to Chromium-discuss, guidovi...@gmail.com
So, would you say that forcing it with the flag --force-gpu-rasterization could hurt performance? I'm trying to boost performance. I know Slack is using that flag in order to improve rendering performance. Maybe is just a matter of trying it and the profiling it.
Reply all
Reply to author
Forward
0 new messages