While profiling Chrome, executing the benchmark page found here:
A hot spot was detected detected in RenderLayerCompositor::updateLayerCompositingState (mostly in updateGraphicsLayerConfiguration()), which appears to be called once for every 2D canvas primitive draw.
For some of the sub tests of this benchmark, as much as 20% of CPU time can be spent in that function. Since canvas draws do not impact the layout of composited layers, there should be no need to visit this code so often.
Related bug: https://bugs.webkit.org/show_bug.cgi?id=90630
fixed by r121987: <http://trac.webkit.org/changeset/121987>
The call to RenderLayerCompositor::updateLayerCompositingState is now bypassed when contentChanged() is called with CanvasPixelsChanged rather than CanvasChanged.