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

Side by Side 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: Remove kEnableNewCompositorAnimations. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 if (replica_layer_.get()) { 109 if (replica_layer_.get()) {
110 DCHECK_EQ(this, replica_layer_->parent()); 110 DCHECK_EQ(this, replica_layer_->parent());
111 replica_layer_->RemoveFromParent(); 111 replica_layer_->RemoveFromParent();
112 } 112 }
113 } 113 }
114 114
115 void Layer::SetLayerTreeHost(LayerTreeHost* host) { 115 void Layer::SetLayerTreeHost(LayerTreeHost* host) {
116 if (layer_tree_host_ == host) 116 if (layer_tree_host_ == host)
117 return; 117 return;
118 118
119 if (layer_tree_host_)
120 layer_tree_host_->UnregisterLayer(this);
119 layer_tree_host_ = host; 121 layer_tree_host_ = host;
122 if (layer_tree_host_)
123 layer_tree_host_->RegisterLayer(this);
120 124
121 // When changing hosts, the layer needs to commit its properties to the impl 125 // When changing hosts, the layer needs to commit its properties to the impl
122 // side for the new host. 126 // side for the new host.
123 SetNeedsPushProperties(); 127 SetNeedsPushProperties();
124 128
125 for (size_t i = 0; i < children_.size(); ++i) 129 for (size_t i = 0; i < children_.size(); ++i)
126 children_[i]->SetLayerTreeHost(host); 130 children_[i]->SetLayerTreeHost(host);
127 131
128 if (mask_layer_.get()) 132 if (mask_layer_.get())
129 mask_layer_->SetLayerTreeHost(host); 133 mask_layer_->SetLayerTreeHost(host);
(...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 } 1347 }
1344 1348
1345 void Layer::SetFrameTimingRequests( 1349 void Layer::SetFrameTimingRequests(
1346 const std::vector<FrameTimingRequest>& requests) { 1350 const std::vector<FrameTimingRequest>& requests) {
1347 frame_timing_requests_ = requests; 1351 frame_timing_requests_ = requests;
1348 frame_timing_requests_dirty_ = true; 1352 frame_timing_requests_dirty_ = true;
1349 SetNeedsCommit(); 1353 SetNeedsCommit();
1350 } 1354 }
1351 1355
1352 } // namespace cc 1356 } // namespace cc
OLDNEW
« cc/animation/animation_player.h ('K') | « 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