OLD | NEW |
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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 layer_tree_->RemoveLayerShouldPushProperties(this); | 213 layer_tree_->RemoveLayerShouldPushProperties(this); |
214 } | 214 } |
215 | 215 |
216 bool Layer::IsPropertyChangeAllowed() const { | 216 bool Layer::IsPropertyChangeAllowed() const { |
217 if (!layer_tree_) | 217 if (!layer_tree_) |
218 return true; | 218 return true; |
219 | 219 |
220 return !layer_tree_->in_paint_layer_contents(); | 220 return !layer_tree_->in_paint_layer_contents(); |
221 } | 221 } |
222 | 222 |
223 sk_sp<SkPicture> Layer::GetPicture() const { | 223 sk_sp<PaintRecord> Layer::GetPicture() const { |
224 return nullptr; | 224 return nullptr; |
225 } | 225 } |
226 | 226 |
227 void Layer::SetParent(Layer* layer) { | 227 void Layer::SetParent(Layer* layer) { |
228 DCHECK(!layer || !layer->HasAncestor(this)); | 228 DCHECK(!layer || !layer->HasAncestor(this)); |
229 | 229 |
230 parent_ = layer; | 230 parent_ = layer; |
231 SetLayerTreeHost(parent_ ? parent_->layer_tree_host() : nullptr); | 231 SetLayerTreeHost(parent_ ? parent_->layer_tree_host() : nullptr); |
232 | 232 |
233 if (!layer_tree_host_) | 233 if (!layer_tree_host_) |
(...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1578 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); | 1578 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); |
1579 return draw_property_utils::ScreenSpaceTransform( | 1579 return draw_property_utils::ScreenSpaceTransform( |
1580 this, layer_tree_->property_trees()->transform_tree); | 1580 this, layer_tree_->property_trees()->transform_tree); |
1581 } | 1581 } |
1582 | 1582 |
1583 LayerTree* Layer::GetLayerTree() const { | 1583 LayerTree* Layer::GetLayerTree() const { |
1584 return layer_tree_; | 1584 return layer_tree_; |
1585 } | 1585 } |
1586 | 1586 |
1587 } // namespace cc | 1587 } // namespace cc |
OLD | NEW |