| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 typedef LayerImplList RenderSurfaceListType; | 87 typedef LayerImplList RenderSurfaceListType; |
| 88 typedef LayerImplList LayerListType; | 88 typedef LayerImplList LayerListType; |
| 89 typedef RenderSurfaceImpl RenderSurfaceType; | 89 typedef RenderSurfaceImpl RenderSurfaceType; |
| 90 | 90 |
| 91 enum RenderingContextConstants { NO_RENDERING_CONTEXT = 0 }; | 91 enum RenderingContextConstants { NO_RENDERING_CONTEXT = 0 }; |
| 92 | 92 |
| 93 static scoped_ptr<LayerImpl> Create(LayerTreeImpl* tree_impl, int id) { | 93 static scoped_ptr<LayerImpl> Create(LayerTreeImpl* tree_impl, int id) { |
| 94 return make_scoped_ptr(new LayerImpl(tree_impl, id)); | 94 return make_scoped_ptr(new LayerImpl(tree_impl, id)); |
| 95 } | 95 } |
| 96 | 96 |
| 97 virtual ~LayerImpl(); | 97 ~LayerImpl() override; |
| 98 | 98 |
| 99 int id() const { return layer_id_; } | 99 int id() const { return layer_id_; } |
| 100 | 100 |
| 101 // LayerAnimationValueProvider implementation. | 101 // LayerAnimationValueProvider implementation. |
| 102 virtual gfx::ScrollOffset ScrollOffsetForAnimation() const override; | 102 gfx::ScrollOffset ScrollOffsetForAnimation() const override; |
| 103 | 103 |
| 104 // LayerAnimationValueObserver implementation. | 104 // LayerAnimationValueObserver implementation. |
| 105 virtual void OnFilterAnimated(const FilterOperations& filters) override; | 105 void OnFilterAnimated(const FilterOperations& filters) override; |
| 106 virtual void OnOpacityAnimated(float opacity) override; | 106 void OnOpacityAnimated(float opacity) override; |
| 107 virtual void OnTransformAnimated(const gfx::Transform& transform) override; | 107 void OnTransformAnimated(const gfx::Transform& transform) override; |
| 108 virtual void OnScrollOffsetAnimated( | 108 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override; |
| 109 const gfx::ScrollOffset& scroll_offset) override; | 109 void OnAnimationWaitingForDeletion() override; |
| 110 virtual void OnAnimationWaitingForDeletion() override; | 110 bool IsActive() const override; |
| 111 virtual bool IsActive() const override; | |
| 112 | 111 |
| 113 // AnimationDelegate implementation. | 112 // AnimationDelegate implementation. |
| 114 virtual void NotifyAnimationStarted(base::TimeTicks monotonic_time, | 113 void NotifyAnimationStarted(base::TimeTicks monotonic_time, |
| 115 Animation::TargetProperty target_property, | 114 Animation::TargetProperty target_property, |
| 116 int group) override{}; | 115 int group) override{}; |
| 117 virtual void NotifyAnimationFinished( | 116 void NotifyAnimationFinished(base::TimeTicks monotonic_time, |
| 118 base::TimeTicks monotonic_time, | 117 Animation::TargetProperty target_property, |
| 119 Animation::TargetProperty target_property, | 118 int group) override; |
| 120 int group) override; | |
| 121 | 119 |
| 122 // Tree structure. | 120 // Tree structure. |
| 123 LayerImpl* parent() { return parent_; } | 121 LayerImpl* parent() { return parent_; } |
| 124 const LayerImpl* parent() const { return parent_; } | 122 const LayerImpl* parent() const { return parent_; } |
| 125 const OwnedLayerImplList& children() const { return children_; } | 123 const OwnedLayerImplList& children() const { return children_; } |
| 126 OwnedLayerImplList& children() { return children_; } | 124 OwnedLayerImplList& children() { return children_; } |
| 127 LayerImpl* child_at(size_t index) const { return children_[index]; } | 125 LayerImpl* child_at(size_t index) const { return children_[index]; } |
| 128 void AddChild(scoped_ptr<LayerImpl> child); | 126 void AddChild(scoped_ptr<LayerImpl> child); |
| 129 scoped_ptr<LayerImpl> RemoveChild(LayerImpl* child); | 127 scoped_ptr<LayerImpl> RemoveChild(LayerImpl* child); |
| 130 void SetParent(LayerImpl* parent); | 128 void SetParent(LayerImpl* parent); |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 DrawProperties<LayerImpl> draw_properties_; | 717 DrawProperties<LayerImpl> draw_properties_; |
| 720 | 718 |
| 721 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; | 719 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; |
| 722 | 720 |
| 723 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 721 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 724 }; | 722 }; |
| 725 | 723 |
| 726 } // namespace cc | 724 } // namespace cc |
| 727 | 725 |
| 728 #endif // CC_LAYERS_LAYER_IMPL_H_ | 726 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |