Cache the absolute bounding box rect on RenderLayer.
Set the cache dirty in RenderLayer::styleChanged and recompute the rect during computeCompositingRequirements. Also, get rid of absoluteBoundingBox from RenderLayer. The only caller can use the new cached value since it always happens after computeCompositingRequirements. The unfortunate thing is that if a RenderLayer is modified, we need to recompute the absolute bounds for all its descendant layers. This saves ~3% of the computeCompositingRequirements time on the tip of tree version of https://github.com/abarth/app-widgets/blob/master/demo.html. The version checked into the key_silk_cases pageset doesn't show the perf win because it doesn't have many RenderLayers outside of the drawer being dragged. The bigger win will come from the following patch that adds/removes layers to the RenderGeometryMap lazily. Right now that's 10-20% of the computeCompositingRequirements time in this demo. Review URL: https://codereview.chromium.org/208313004 git-svn-id: svn://svn.chromium.org/blink/trunk@169786 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment