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 #ifndef CC_LAYERS_LAYER_H_ | 5 #ifndef CC_LAYERS_LAYER_H_ |
6 #define CC_LAYERS_LAYER_H_ | 6 #define CC_LAYERS_LAYER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 void RemoveFromParent(); | 93 void RemoveFromParent(); |
94 void RemoveAllChildren(); | 94 void RemoveAllChildren(); |
95 void SetChildren(const LayerList& children); | 95 void SetChildren(const LayerList& children); |
96 bool HasAncestor(const Layer* ancestor) const; | 96 bool HasAncestor(const Layer* ancestor) const; |
97 | 97 |
98 const LayerList& children() const { return children_; } | 98 const LayerList& children() const { return children_; } |
99 Layer* child_at(size_t index) { return children_[index].get(); } | 99 Layer* child_at(size_t index) { return children_[index].get(); } |
100 | 100 |
101 // This requests the layer and its subtree be rendered and given to the | 101 // This requests the layer and its subtree be rendered and given to the |
102 // callback. If the copy is unable to be produced (the layer is destroyed | 102 // callback. If the copy is unable to be produced (the layer is destroyed |
103 // first), then the callback is called with a NULL/empty result. | 103 // first), then the callback is called with a nullptr/empty result. |
104 void RequestCopyOfOutput(scoped_ptr<CopyOutputRequest> request); | 104 void RequestCopyOfOutput(scoped_ptr<CopyOutputRequest> request); |
105 bool HasCopyRequest() const { | 105 bool HasCopyRequest() const { |
106 return !copy_requests_.empty(); | 106 return !copy_requests_.empty(); |
107 } | 107 } |
108 | 108 |
109 virtual void SetBackgroundColor(SkColor background_color); | 109 virtual void SetBackgroundColor(SkColor background_color); |
110 SkColor background_color() const { return background_color_; } | 110 SkColor background_color() const { return background_color_; } |
111 // If contents_opaque(), return an opaque color else return a | 111 // If contents_opaque(), return an opaque color else return a |
112 // non-opaque color. Tries to return background_color(), if possible. | 112 // non-opaque color. Tries to return background_color(), if possible. |
113 SkColor SafeOpaqueBackgroundColor() const; | 113 SkColor SafeOpaqueBackgroundColor() const; |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 DrawProperties<Layer> draw_properties_; | 641 DrawProperties<Layer> draw_properties_; |
642 | 642 |
643 PaintProperties paint_properties_; | 643 PaintProperties paint_properties_; |
644 | 644 |
645 DISALLOW_COPY_AND_ASSIGN(Layer); | 645 DISALLOW_COPY_AND_ASSIGN(Layer); |
646 }; | 646 }; |
647 | 647 |
648 } // namespace cc | 648 } // namespace cc |
649 | 649 |
650 #endif // CC_LAYERS_LAYER_H_ | 650 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |