Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Unified Diff: ui/compositor/layer_owner.cc

Issue 975943002: Implemented screen rotation animation experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed outstanding comments from Patch set 1 & 2. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/compositor/layer_owner.cc
diff --git a/ui/compositor/layer_owner.cc b/ui/compositor/layer_owner.cc
index cd614b37d8dca3e7e11326c2777d0e72cd80336d..9325d4a8dbd789c441f474df35291557f75d8917 100644
--- a/ui/compositor/layer_owner.cc
+++ b/ui/compositor/layer_owner.cc
@@ -73,6 +73,12 @@ scoped_ptr<Layer> LayerOwner::RecreateLayer() {
if (layer_owner_delegate_)
layer_owner_delegate_->OnLayerRecreated(old_layer.get(), new_layer);
bruthig 2015/03/06 16:00:33 This file will NOT be submitted with this CL. It
+ // If old_layer was the layer tree root then we need to move the Compositor
+ // over to the new root.
+ const bool is_root = !old_layer->parent();
+ if (is_root && old_layer->GetCompositor())
+ old_layer->GetCompositor()->SetRootLayer(new_layer);
+
return old_layer.Pass();
}

Powered by Google App Engine
This is Rietveld 408576698