Chromium Code Reviews| 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 UnionDamageContentRect(gfx::RectF damage_content_rect); | |
|
reveman
2014/04/15 16:25:59
nit: pass by const reference instead
reveman
2014/04/15 16:25:59
I would prefer SetContentDamageRect() and have the
enne (OOO)
2014/04/15 17:27:27
(Personally I think what you suggest is a violatio
reveman
2014/04/15 17:50:48
Makes sense. I prefer AddContentDamageRect() in th
enne (OOO)
2014/04/15 17:55:42
How about AddLayerDamageRect?
Sorry to keep quibb
| |
| 458 | |
| 459 const gfx::RectF& damage_content_rect() const { return damage_content_rect_; } | |
|
reveman
2014/04/15 16:25:59
content_damage_rect()? makes it sound more like a
| |
| 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 gfx::RectF damage_content_rect_; | |
| 660 | |
| 655 // Manages animations for this layer. | 661 // Manages animations for this layer. |
| 656 scoped_refptr<LayerAnimationController> layer_animation_controller_; | 662 scoped_refptr<LayerAnimationController> layer_animation_controller_; |
| 657 | 663 |
| 658 // Manages scrollbars for this layer | 664 // Manages scrollbars for this layer |
| 659 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; | 665 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; |
| 660 | 666 |
| 661 scoped_ptr<ScrollbarSet> scrollbars_; | 667 scoped_ptr<ScrollbarSet> scrollbars_; |
| 662 | 668 |
| 663 ScopedPtrVector<CopyOutputRequest> copy_requests_; | 669 ScopedPtrVector<CopyOutputRequest> copy_requests_; |
| 664 | 670 |
| 665 // Group of properties that need to be computed based on the layer tree | 671 // Group of properties that need to be computed based on the layer tree |
| 666 // hierarchy before layers can be drawn. | 672 // hierarchy before layers can be drawn. |
| 667 DrawProperties<LayerImpl> draw_properties_; | 673 DrawProperties<LayerImpl> draw_properties_; |
| 668 | 674 |
| 669 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; | 675 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; |
| 670 | 676 |
| 671 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 677 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 672 }; | 678 }; |
| 673 | 679 |
| 674 } // namespace cc | 680 } // namespace cc |
| 675 | 681 |
| 676 #endif // CC_LAYERS_LAYER_IMPL_H_ | 682 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |