Update setting of Compositor on new root Layer
When calling LayerOwner::RecreateLayer() on the root Layer, the Compositor gets moved to the new layer after all children are added. If there are ongoing animations while this occurs they are cancelled. If any animation observer attempts to access the compositor in response it will crash Chrome as the compositor is null. Update LayerOwner::RecreateLayer() to set the Compositor on the new root layer bfore adding children. This also brings it to the same timing as when the compositor would be set while performing RecreateLayer on non-root layers. TEST=LayerOwnerTestWithCompositor.RecreateRootLayerDuringAnimation, compositor_unittests, ash_unittests, views_unittests BUG=chrome-os-partner:40032 Review URL: https://codereview.chromium.org/1128103003 Cr-Commit-Position: refs/heads/master@{#329446}
Showing
Please register or sign in to comment