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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 | 464 |
465 void SetTransform(const gfx::Transform& transform); | 465 void SetTransform(const gfx::Transform& transform); |
466 const gfx::Transform& transform() const { return transform_; } | 466 const gfx::Transform& transform() const { return transform_; } |
467 bool TransformIsAnimating() const; | 467 bool TransformIsAnimating() const; |
468 bool TransformIsAnimatingOnImplOnly() const; | 468 bool TransformIsAnimatingOnImplOnly() const; |
469 void SetTransformAndInvertibility(const gfx::Transform& transform, | 469 void SetTransformAndInvertibility(const gfx::Transform& transform, |
470 bool transform_is_invertible); | 470 bool transform_is_invertible); |
471 bool transform_is_invertible() const { return transform_is_invertible_; } | 471 bool transform_is_invertible() const { return transform_is_invertible_; } |
472 | 472 |
473 // Note this rect is in layer space (not content space). | 473 // Note this rect is in layer space (not content space). |
474 void SetUpdateRect(const gfx::RectF& update_rect); | 474 void SetUpdateRect(const gfx::Rect& update_rect); |
475 | 475 gfx::Rect update_rect() const { return update_rect_; } |
476 const gfx::RectF& update_rect() const { return update_rect_; } | |
477 | 476 |
478 void AddDamageRect(const gfx::RectF& damage_rect); | 477 void AddDamageRect(const gfx::RectF& damage_rect); |
479 | 478 |
480 const gfx::RectF& damage_rect() const { return damage_rect_; } | 479 const gfx::RectF& damage_rect() const { return damage_rect_; } |
481 | 480 |
482 virtual base::DictionaryValue* LayerTreeAsJson() const; | 481 virtual base::DictionaryValue* LayerTreeAsJson() const; |
483 | 482 |
484 void SetStackingOrderChanged(bool stacking_order_changed); | 483 void SetStackingOrderChanged(bool stacking_order_changed); |
485 | 484 |
486 bool LayerPropertyChanged() const { return layer_property_changed_; } | 485 bool LayerPropertyChanged() const { return layer_property_changed_; } |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 // space. 0 is a special value that means this layer will not be sorted and | 680 // space. 0 is a special value that means this layer will not be sorted and |
682 // will be drawn in paint order. | 681 // will be drawn in paint order. |
683 int sorting_context_id_; | 682 int sorting_context_id_; |
684 | 683 |
685 DrawMode current_draw_mode_; | 684 DrawMode current_draw_mode_; |
686 | 685 |
687 private: | 686 private: |
688 // Rect indicating what was repainted/updated during update. | 687 // Rect indicating what was repainted/updated during update. |
689 // Note that plugin layers bypass this and leave it empty. | 688 // Note that plugin layers bypass this and leave it empty. |
690 // Uses layer (not content) space. | 689 // Uses layer (not content) space. |
691 gfx::RectF update_rect_; | 690 gfx::Rect update_rect_; |
692 | 691 |
693 // This rect is in layer space. | 692 // This rect is in layer space. |
694 gfx::RectF damage_rect_; | 693 gfx::RectF damage_rect_; |
695 | 694 |
696 // Manages animations for this layer. | 695 // Manages animations for this layer. |
697 scoped_refptr<LayerAnimationController> layer_animation_controller_; | 696 scoped_refptr<LayerAnimationController> layer_animation_controller_; |
698 | 697 |
699 // Manages scrollbars for this layer | 698 // Manages scrollbars for this layer |
700 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; | 699 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; |
701 | 700 |
702 scoped_ptr<ScrollbarSet> scrollbars_; | 701 scoped_ptr<ScrollbarSet> scrollbars_; |
703 | 702 |
704 ScopedPtrVector<CopyOutputRequest> copy_requests_; | 703 ScopedPtrVector<CopyOutputRequest> copy_requests_; |
705 | 704 |
706 // Group of properties that need to be computed based on the layer tree | 705 // Group of properties that need to be computed based on the layer tree |
707 // hierarchy before layers can be drawn. | 706 // hierarchy before layers can be drawn. |
708 DrawProperties<LayerImpl> draw_properties_; | 707 DrawProperties<LayerImpl> draw_properties_; |
709 | 708 |
710 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; | 709 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; |
711 | 710 |
712 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 711 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
713 }; | 712 }; |
714 | 713 |
715 } // namespace cc | 714 } // namespace cc |
716 | 715 |
717 #endif // CC_LAYERS_LAYER_IMPL_H_ | 716 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |