Bug 90695 - Performance: 2D Canvas rendering spending a lot of CPU time in RenderLayerCompositor::updateLayerCompositingState
Summary: Performance: 2D Canvas rendering spending a lot of CPU time in RenderLayerCom...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2012-07-06 10:14 PDT by Justin Novosad
Modified: 2012-07-06 11:08 PDT (History)
4 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Justin Novosad 2012-07-06 10:14:00 PDT
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
Comment 1 Justin Novosad 2012-07-06 11:08:06 PDT
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.