Chromium Code Reviews| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 class Animation; | 54 class Animation; |
| 55 class AnimationDelegate; | 55 class AnimationDelegate; |
| 56 struct AnimationEvent; | 56 struct AnimationEvent; |
| 57 class CopyOutputRequest; | 57 class CopyOutputRequest; |
| 58 class LayerAnimationEventObserver; | 58 class LayerAnimationEventObserver; |
| 59 class LayerClient; | 59 class LayerClient; |
| 60 class LayerImpl; | 60 class LayerImpl; |
| 61 class LayerTreeHost; | 61 class LayerTreeHost; |
| 62 class LayerTreeHostCommon; | 62 class LayerTreeHostCommon; |
| 63 class LayerTreeImpl; | 63 class LayerTreeImpl; |
| 64 class LayerTreeSettings; | |
| 64 class PriorityCalculator; | 65 class PriorityCalculator; |
| 65 class RenderingStatsInstrumentation; | 66 class RenderingStatsInstrumentation; |
| 66 class ResourceUpdateQueue; | 67 class ResourceUpdateQueue; |
| 67 class ScrollbarLayerInterface; | 68 class ScrollbarLayerInterface; |
| 68 class SimpleEnclosedRegion; | 69 class SimpleEnclosedRegion; |
| 69 struct AnimationEvent; | 70 struct AnimationEvent; |
| 70 template <typename LayerType> | 71 template <typename LayerType> |
| 71 class OcclusionTracker; | 72 class OcclusionTracker; |
| 72 | 73 |
| 73 // Base class for composited layers. Special layer types are derived from | 74 // Base class for composited layers. Special layer types are derived from |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 405 float* contents_scale_x, | 406 float* contents_scale_x, |
| 406 float* contents_scale_y, | 407 float* contents_scale_y, |
| 407 gfx::Size* content_bounds); | 408 gfx::Size* content_bounds); |
| 408 | 409 |
| 409 LayerTreeHost* layer_tree_host() { return layer_tree_host_; } | 410 LayerTreeHost* layer_tree_host() { return layer_tree_host_; } |
| 410 const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } | 411 const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } |
| 411 | 412 |
| 412 // Set the priority of all desired textures in this layer. | 413 // Set the priority of all desired textures in this layer. |
| 413 virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) {} | 414 virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) {} |
| 414 | 415 |
| 416 static void SetCompositorAnimationTimelinesEnabled(bool enabled); | |
| 417 | |
| 415 bool AddAnimation(scoped_ptr<Animation> animation); | 418 bool AddAnimation(scoped_ptr<Animation> animation); |
| 416 void PauseAnimation(int animation_id, double time_offset); | 419 void PauseAnimation(int animation_id, double time_offset); |
| 417 void RemoveAnimation(int animation_id); | 420 void RemoveAnimation(int animation_id); |
| 418 void RemoveAnimation(int animation_id, Animation::TargetProperty property); | 421 void RemoveAnimation(int animation_id, Animation::TargetProperty property); |
| 419 | 422 |
| 420 LayerAnimationController* layer_animation_controller() { | 423 LayerAnimationController* layer_animation_controller() { |
| 421 return layer_animation_controller_.get(); | 424 return layer_animation_controller_.get(); |
| 422 } | 425 } |
| 423 void SetLayerAnimationControllerForTest( | 426 void SetLayerAnimationControllerForTest( |
| 424 scoped_refptr<LayerAnimationController> controller); | 427 scoped_refptr<LayerAnimationController> controller); |
| 425 | 428 |
| 426 void set_layer_animation_delegate(AnimationDelegate* delegate) { | 429 void set_layer_animation_delegate(AnimationDelegate* delegate) { |
| 430 DCHECK(layer_animation_controller_); | |
|
danakj
2015/05/08 18:21:40
i don't think this DCHECK is doing much for you? y
loyso (OOO)
2015/05/11 06:59:43
It makes the problem clear. null-deref is undefine
| |
| 427 layer_animation_controller_->set_layer_animation_delegate(delegate); | 431 layer_animation_controller_->set_layer_animation_delegate(delegate); |
| 428 } | 432 } |
| 429 | 433 |
| 430 bool HasActiveAnimation() const; | 434 bool HasActiveAnimation() const; |
| 435 void RegisterForAnimations(AnimationRegistrar* registrar, | |
| 436 const LayerTreeSettings& settings); | |
| 431 | 437 |
| 432 void AddLayerAnimationEventObserver( | 438 void AddLayerAnimationEventObserver( |
| 433 LayerAnimationEventObserver* animation_observer); | 439 LayerAnimationEventObserver* animation_observer); |
| 434 void RemoveLayerAnimationEventObserver( | 440 void RemoveLayerAnimationEventObserver( |
| 435 LayerAnimationEventObserver* animation_observer); | 441 LayerAnimationEventObserver* animation_observer); |
| 436 | 442 |
| 437 virtual SimpleEnclosedRegion VisibleContentOpaqueRegion() const; | 443 virtual SimpleEnclosedRegion VisibleContentOpaqueRegion() const; |
| 438 | 444 |
| 439 virtual ScrollbarLayerInterface* ToScrollbarLayer(); | 445 virtual ScrollbarLayerInterface* ToScrollbarLayer(); |
| 440 | 446 |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 754 | 760 |
| 755 std::vector<FrameTimingRequest> frame_timing_requests_; | 761 std::vector<FrameTimingRequest> frame_timing_requests_; |
| 756 bool frame_timing_requests_dirty_; | 762 bool frame_timing_requests_dirty_; |
| 757 | 763 |
| 758 DISALLOW_COPY_AND_ASSIGN(Layer); | 764 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 759 }; | 765 }; |
| 760 | 766 |
| 761 } // namespace cc | 767 } // namespace cc |
| 762 | 768 |
| 763 #endif // CC_LAYERS_LAYER_H_ | 769 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |