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 #include <vector> | 10 #include <vector> |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 class AnimationDelegate; | 55 class AnimationDelegate; |
56 struct AnimationEvent; | 56 struct AnimationEvent; |
57 class CopyOutputRequest; | 57 class CopyOutputRequest; |
58 class LayerAnimationDelegate; | 58 class LayerAnimationDelegate; |
59 class LayerAnimationEventObserver; | 59 class LayerAnimationEventObserver; |
60 class LayerClient; | 60 class LayerClient; |
61 class LayerImpl; | 61 class LayerImpl; |
62 class LayerTreeHost; | 62 class LayerTreeHost; |
63 class LayerTreeHostCommon; | 63 class LayerTreeHostCommon; |
64 class LayerTreeImpl; | 64 class LayerTreeImpl; |
| 65 class LayerTreeSettings; |
65 class PriorityCalculator; | 66 class PriorityCalculator; |
66 class RenderingStatsInstrumentation; | 67 class RenderingStatsInstrumentation; |
67 class ResourceUpdateQueue; | 68 class ResourceUpdateQueue; |
68 class ScrollbarLayerInterface; | 69 class ScrollbarLayerInterface; |
69 class SimpleEnclosedRegion; | 70 class SimpleEnclosedRegion; |
70 struct AnimationEvent; | 71 struct AnimationEvent; |
71 template <typename LayerType> | 72 template <typename LayerType> |
72 class OcclusionTracker; | 73 class OcclusionTracker; |
73 | 74 |
74 // Base class for composited layers. Special layer types are derived from | 75 // Base class for composited layers. Special layer types are derived from |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 LayerTreeHost* layer_tree_host() { return layer_tree_host_; } | 411 LayerTreeHost* layer_tree_host() { return layer_tree_host_; } |
411 const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } | 412 const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } |
412 | 413 |
413 // Set the priority of all desired textures in this layer. | 414 // Set the priority of all desired textures in this layer. |
414 virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) {} | 415 virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) {} |
415 | 416 |
416 bool AddAnimation(scoped_ptr<Animation> animation); | 417 bool AddAnimation(scoped_ptr<Animation> animation); |
417 void PauseAnimation(int animation_id, double time_offset); | 418 void PauseAnimation(int animation_id, double time_offset); |
418 void RemoveAnimation(int animation_id); | 419 void RemoveAnimation(int animation_id); |
419 void RemoveAnimation(int animation_id, Animation::TargetProperty property); | 420 void RemoveAnimation(int animation_id, Animation::TargetProperty property); |
420 | |
421 LayerAnimationController* layer_animation_controller() { | 421 LayerAnimationController* layer_animation_controller() { |
422 return layer_animation_controller_.get(); | 422 return layer_animation_controller_.get(); |
423 } | 423 } |
424 void SetLayerAnimationControllerForTest( | 424 void SetLayerAnimationControllerForTest( |
425 scoped_refptr<LayerAnimationController> controller); | 425 scoped_refptr<LayerAnimationController> controller); |
426 | 426 |
427 void set_layer_animation_delegate(AnimationDelegate* delegate) { | 427 void set_layer_animation_delegate(AnimationDelegate* delegate) { |
| 428 DCHECK(layer_animation_controller_); |
428 layer_animation_controller_->set_layer_animation_delegate(delegate); | 429 layer_animation_controller_->set_layer_animation_delegate(delegate); |
429 } | 430 } |
430 | 431 |
431 bool HasActiveAnimation() const; | 432 bool HasActiveAnimation() const; |
| 433 void RegisterForAnimations(AnimationRegistrar* registrar, |
| 434 const LayerTreeSettings& settings); |
432 | 435 |
433 void AddLayerAnimationEventObserver( | 436 void AddLayerAnimationEventObserver( |
434 LayerAnimationEventObserver* animation_observer); | 437 LayerAnimationEventObserver* animation_observer); |
435 void RemoveLayerAnimationEventObserver( | 438 void RemoveLayerAnimationEventObserver( |
436 LayerAnimationEventObserver* animation_observer); | 439 LayerAnimationEventObserver* animation_observer); |
437 | 440 |
438 virtual SimpleEnclosedRegion VisibleContentOpaqueRegion() const; | 441 virtual SimpleEnclosedRegion VisibleContentOpaqueRegion() const; |
439 | 442 |
440 virtual ScrollbarLayerInterface* ToScrollbarLayer(); | 443 virtual ScrollbarLayerInterface* ToScrollbarLayer(); |
441 | 444 |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 | 731 |
729 std::vector<FrameTimingRequest> frame_timing_requests_; | 732 std::vector<FrameTimingRequest> frame_timing_requests_; |
730 bool frame_timing_requests_dirty_; | 733 bool frame_timing_requests_dirty_; |
731 | 734 |
732 DISALLOW_COPY_AND_ASSIGN(Layer); | 735 DISALLOW_COPY_AND_ASSIGN(Layer); |
733 }; | 736 }; |
734 | 737 |
735 } // namespace cc | 738 } // namespace cc |
736 | 739 |
737 #endif // CC_LAYERS_LAYER_H_ | 740 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |