update3dRenderingContext is 13.5% of GraphicsLayerUpdater::rebuildTree

Prior to this CL, we were recomputing the 3D rendering context root for every
RenderLayer every frame. That work accounted for 13.5% of
GraphicsLayerUpdater::rebuildTree and 2.4% of the entire compositing update.
This work is almost entirely wasted because the 3D rendering context is
completely determined by style information and therefore can change only when
style changes.

Elliott and I looked at integrating this computation with recalc style, but
upon studying the code closely, I realize that this function doesn't actually
walk up the tree very far. Instead, it looks only at the enclosing render
layer of the containing block. That means we don't need to cache this data on
RenderLayer at all. Instead, we can recompute it when needed by the one caller:
CompositedLayerMapping::updateRenderingContext. That caller only cares about
RenderLayers that actually have a composited layer mapping, which is vastly
fewer than all RenderLayers. Moreover, that caller already understands
dirtiness caused by style changes.

Review URL: https://codereview.chromium.org/209003014

git-svn-id: svn://svn.chromium.org/blink/trunk@170090 bbb929c8-8fbe-4397-9dbb-9b2b20218538