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

Unified Diff: cc/layers/layer.cc

Issue 947033002: CC Animations: Establish AnimationHost, AnimationTimeline and AnimationPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set up impl-only timelines for ScrollOffset animations Created 5 years, 8 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
« no previous file with comments | « cc/cc.gyp ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 938449cb968e2e57ac3e792c1c4d9d6ddd1c548b..b7d6e316e600bc826de0586702e4d1d9f5be8468 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -118,7 +118,11 @@ void Layer::SetLayerTreeHost(LayerTreeHost* host) {
if (layer_tree_host_ == host)
return;
+ if (layer_tree_host_)
+ layer_tree_host_->UnregisterLayer(this);
layer_tree_host_ = host;
+ if (layer_tree_host_)
+ layer_tree_host_->RegisterLayer(this);
// When changing hosts, the layer needs to commit its properties to the impl
// side for the new host.
« no previous file with comments | « cc/cc.gyp ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698