| Index: cc/layer_tree_host_impl.cc
|
| diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
|
| index e6b9ac99e0d49ae673f001b56a4ce6ad514d74aa..39ef4829134910bc1fd967ece7edb66895ae8a72 100644
|
| --- a/cc/layer_tree_host_impl.cc
|
| +++ b/cc/layer_tree_host_impl.cc
|
| @@ -966,10 +966,13 @@ bool LayerTreeHostImpl::initializeRenderer(scoped_ptr<OutputSurface> outputSurfa
|
| // Since we will create a new resource provider, we cannot continue to use
|
| // the old resources (i.e. renderSurfaces and texture IDs). Clear them
|
| // before we destroy the old resource provider.
|
| - if (rootLayer()) {
|
| + if (rootLayer())
|
| clearRenderSurfaces();
|
| - sendDidLoseOutputSurfaceRecursive(rootLayer());
|
| - }
|
| + if (activeTree()->RootLayer())
|
| + sendDidLoseOutputSurfaceRecursive(activeTree()->RootLayer());
|
| + if (pendingTree() && pendingTree()->RootLayer())
|
| + sendDidLoseOutputSurfaceRecursive(pendingTree()->RootLayer());
|
| +
|
| // Note: order is important here.
|
| m_renderer.reset();
|
| m_tileManager.reset();
|
|
|