| 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 <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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 return content_rect; | 237 return content_rect; |
| 238 } | 238 } |
| 239 | 239 |
| 240 skia::RefPtr<SkPicture> Layer::GetPicture() const { | 240 skia::RefPtr<SkPicture> Layer::GetPicture() const { |
| 241 return skia::RefPtr<SkPicture>(); | 241 return skia::RefPtr<SkPicture>(); |
| 242 } | 242 } |
| 243 | 243 |
| 244 void Layer::SetParent(Layer* layer) { | 244 void Layer::SetParent(Layer* layer) { |
| 245 DCHECK(!layer || !layer->HasAncestor(this)); | 245 DCHECK(!layer || !layer->HasAncestor(this)); |
| 246 | 246 |
| 247 transform_tree_index_ = -1; |
| 248 clip_tree_index_ = -1; |
| 249 opacity_tree_index_ = -1; |
| 250 |
| 247 if (parent_should_know_need_push_properties()) { | 251 if (parent_should_know_need_push_properties()) { |
| 248 if (parent_) | 252 if (parent_) |
| 249 parent_->RemoveDependentNeedsPushProperties(); | 253 parent_->RemoveDependentNeedsPushProperties(); |
| 250 if (layer) | 254 if (layer) |
| 251 layer->AddDependentNeedsPushProperties(); | 255 layer->AddDependentNeedsPushProperties(); |
| 252 } | 256 } |
| 253 | 257 |
| 254 parent_ = layer; | 258 parent_ = layer; |
| 255 SetLayerTreeHost(parent_ ? parent_->layer_tree_host() : nullptr); | 259 SetLayerTreeHost(parent_ ? parent_->layer_tree_host() : nullptr); |
| 256 | 260 |
| (...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1514 | 1518 |
| 1515 void Layer::DidBeginTracing() { | 1519 void Layer::DidBeginTracing() { |
| 1516 // We'll be dumping layer trees as part of trace, so make sure | 1520 // We'll be dumping layer trees as part of trace, so make sure |
| 1517 // PushPropertiesTo() propagates layer debug info to the impl | 1521 // PushPropertiesTo() propagates layer debug info to the impl |
| 1518 // side -- otherwise this won't happen for the the layers that | 1522 // side -- otherwise this won't happen for the the layers that |
| 1519 // remain unchanged since tracing started. | 1523 // remain unchanged since tracing started. |
| 1520 SetNeedsPushProperties(); | 1524 SetNeedsPushProperties(); |
| 1521 } | 1525 } |
| 1522 | 1526 |
| 1523 } // namespace cc | 1527 } // namespace cc |
| OLD | NEW |