| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 #ifndef CC_LAYERS_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_LAYER_IMPL_H_ | 6 #define CC_LAYERS_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 const LayerImpl* parent() const { return parent_; } | 68 const LayerImpl* parent() const { return parent_; } |
| 69 const OwnedLayerImplList& children() const { return children_; } | 69 const OwnedLayerImplList& children() const { return children_; } |
| 70 OwnedLayerImplList& children() { return children_; } | 70 OwnedLayerImplList& children() { return children_; } |
| 71 LayerImpl* child_at(size_t index) const { return children_[index]; } | 71 LayerImpl* child_at(size_t index) const { return children_[index]; } |
| 72 void AddChild(scoped_ptr<LayerImpl> child); | 72 void AddChild(scoped_ptr<LayerImpl> child); |
| 73 scoped_ptr<LayerImpl> RemoveChild(LayerImpl* child); | 73 scoped_ptr<LayerImpl> RemoveChild(LayerImpl* child); |
| 74 void set_parent(LayerImpl* parent) { parent_ = parent; } | 74 void set_parent(LayerImpl* parent) { parent_ = parent; } |
| 75 // Warning: This does not preserve tree structure invariants. | 75 // Warning: This does not preserve tree structure invariants. |
| 76 void ClearChildList(); | 76 void ClearChildList(); |
| 77 | 77 |
| 78 void PassRequestCopyCallbacks( |
| 79 std::vector<RenderPass::RequestCopyAsBitmapCallback>* callbacks); |
| 80 void TakeRequestCopyCallbacks( |
| 81 std::vector<RenderPass::RequestCopyAsBitmapCallback>* callbacks); |
| 82 bool HasRequestCopyCallback() const { |
| 83 return !request_copy_callbacks_.empty(); |
| 84 } |
| 85 |
| 78 void SetMaskLayer(scoped_ptr<LayerImpl> mask_layer); | 86 void SetMaskLayer(scoped_ptr<LayerImpl> mask_layer); |
| 79 LayerImpl* mask_layer() { return mask_layer_.get(); } | 87 LayerImpl* mask_layer() { return mask_layer_.get(); } |
| 80 const LayerImpl* mask_layer() const { return mask_layer_.get(); } | 88 const LayerImpl* mask_layer() const { return mask_layer_.get(); } |
| 81 scoped_ptr<LayerImpl> TakeMaskLayer(); | 89 scoped_ptr<LayerImpl> TakeMaskLayer(); |
| 82 | 90 |
| 83 void SetReplicaLayer(scoped_ptr<LayerImpl> replica_layer); | 91 void SetReplicaLayer(scoped_ptr<LayerImpl> replica_layer); |
| 84 LayerImpl* replica_layer() { return replica_layer_.get(); } | 92 LayerImpl* replica_layer() { return replica_layer_.get(); } |
| 85 const LayerImpl* replica_layer() const { return replica_layer_.get(); } | 93 const LayerImpl* replica_layer() const { return replica_layer_.get(); } |
| 86 scoped_ptr<LayerImpl> TakeReplicaLayer(); | 94 scoped_ptr<LayerImpl> TakeReplicaLayer(); |
| 87 | 95 |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 scoped_refptr<LayerAnimationController> layer_animation_controller_; | 530 scoped_refptr<LayerAnimationController> layer_animation_controller_; |
| 523 | 531 |
| 524 // Manages scrollbars for this layer | 532 // Manages scrollbars for this layer |
| 525 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; | 533 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; |
| 526 | 534 |
| 527 // Weak pointers to this layer's scrollbars, if it has them. Updated during | 535 // Weak pointers to this layer's scrollbars, if it has them. Updated during |
| 528 // tree synchronization. | 536 // tree synchronization. |
| 529 ScrollbarLayerImpl* horizontal_scrollbar_layer_; | 537 ScrollbarLayerImpl* horizontal_scrollbar_layer_; |
| 530 ScrollbarLayerImpl* vertical_scrollbar_layer_; | 538 ScrollbarLayerImpl* vertical_scrollbar_layer_; |
| 531 | 539 |
| 540 std::vector<RenderPass::RequestCopyAsBitmapCallback> request_copy_callbacks_; |
| 541 |
| 532 // Group of properties that need to be computed based on the layer tree | 542 // Group of properties that need to be computed based on the layer tree |
| 533 // hierarchy before layers can be drawn. | 543 // hierarchy before layers can be drawn. |
| 534 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; | 544 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; |
| 535 | 545 |
| 536 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 546 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 537 }; | 547 }; |
| 538 | 548 |
| 539 } // namespace cc | 549 } // namespace cc |
| 540 | 550 |
| 541 #endif // CC_LAYERS_LAYER_IMPL_H_ | 551 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |