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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 void SetTransform(const gfx::Transform& transform); | 447 void SetTransform(const gfx::Transform& transform); |
448 const gfx::Transform& transform() const { return transform_; } | 448 const gfx::Transform& transform() const { return transform_; } |
449 bool TransformIsAnimating() const; | 449 bool TransformIsAnimating() const; |
450 bool TransformIsAnimatingOnImplOnly() const; | 450 bool TransformIsAnimatingOnImplOnly() const; |
451 | 451 |
452 // Note this rect is in layer space (not content space). | 452 // Note this rect is in layer space (not content space). |
453 void SetUpdateRect(const gfx::RectF& update_rect); | 453 void SetUpdateRect(const gfx::RectF& update_rect); |
454 | 454 |
455 const gfx::RectF& update_rect() const { return update_rect_; } | 455 const gfx::RectF& update_rect() const { return update_rect_; } |
456 | 456 |
| 457 void AddLayerDamageRect(const gfx::RectF& damage_rect); |
| 458 |
| 459 const gfx::RectF& damage_rect() const { return damage_rect_; } |
| 460 |
457 virtual base::DictionaryValue* LayerTreeAsJson() const; | 461 virtual base::DictionaryValue* LayerTreeAsJson() const; |
458 | 462 |
459 void SetStackingOrderChanged(bool stacking_order_changed); | 463 void SetStackingOrderChanged(bool stacking_order_changed); |
460 | 464 |
461 bool LayerPropertyChanged() const { return layer_property_changed_; } | 465 bool LayerPropertyChanged() const { return layer_property_changed_; } |
462 | 466 |
463 void ResetAllChangeTrackingForSubtree(); | 467 void ResetAllChangeTrackingForSubtree(); |
464 | 468 |
465 LayerAnimationController* layer_animation_controller() { | 469 LayerAnimationController* layer_animation_controller() { |
466 return layer_animation_controller_.get(); | 470 return layer_animation_controller_.get(); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 int num_dependents_need_push_properties_; | 649 int num_dependents_need_push_properties_; |
646 | 650 |
647 DrawMode current_draw_mode_; | 651 DrawMode current_draw_mode_; |
648 | 652 |
649 private: | 653 private: |
650 // Rect indicating what was repainted/updated during update. | 654 // Rect indicating what was repainted/updated during update. |
651 // Note that plugin layers bypass this and leave it empty. | 655 // Note that plugin layers bypass this and leave it empty. |
652 // Uses layer (not content) space. | 656 // Uses layer (not content) space. |
653 gfx::RectF update_rect_; | 657 gfx::RectF update_rect_; |
654 | 658 |
| 659 // This rect is in layer space. |
| 660 gfx::RectF damage_rect_; |
| 661 |
655 // Manages animations for this layer. | 662 // Manages animations for this layer. |
656 scoped_refptr<LayerAnimationController> layer_animation_controller_; | 663 scoped_refptr<LayerAnimationController> layer_animation_controller_; |
657 | 664 |
658 // Manages scrollbars for this layer | 665 // Manages scrollbars for this layer |
659 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; | 666 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; |
660 | 667 |
661 scoped_ptr<ScrollbarSet> scrollbars_; | 668 scoped_ptr<ScrollbarSet> scrollbars_; |
662 | 669 |
663 ScopedPtrVector<CopyOutputRequest> copy_requests_; | 670 ScopedPtrVector<CopyOutputRequest> copy_requests_; |
664 | 671 |
665 // Group of properties that need to be computed based on the layer tree | 672 // Group of properties that need to be computed based on the layer tree |
666 // hierarchy before layers can be drawn. | 673 // hierarchy before layers can be drawn. |
667 DrawProperties<LayerImpl> draw_properties_; | 674 DrawProperties<LayerImpl> draw_properties_; |
668 | 675 |
669 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; | 676 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; |
670 | 677 |
671 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 678 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
672 }; | 679 }; |
673 | 680 |
674 } // namespace cc | 681 } // namespace cc |
675 | 682 |
676 #endif // CC_LAYERS_LAYER_IMPL_H_ | 683 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |