| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 gfx::SizeF BoundsForScrolling() const; | 424 gfx::SizeF BoundsForScrolling() const; |
| 425 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); | 425 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); |
| 426 gfx::Vector2dF bounds_delta() const { return bounds_delta_; } | 426 gfx::Vector2dF bounds_delta() const { return bounds_delta_; } |
| 427 | 427 |
| 428 void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset); | 428 void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset); |
| 429 gfx::ScrollOffset CurrentScrollOffset() const; | 429 gfx::ScrollOffset CurrentScrollOffset() const; |
| 430 | 430 |
| 431 gfx::ScrollOffset MaxScrollOffset() const; | 431 gfx::ScrollOffset MaxScrollOffset() const; |
| 432 gfx::ScrollOffset ClampScrollOffsetToLimits(gfx::ScrollOffset offset) const; | 432 gfx::ScrollOffset ClampScrollOffsetToLimits(gfx::ScrollOffset offset) const; |
| 433 gfx::Vector2dF ClampScrollToMaxScrollOffset(); | 433 gfx::Vector2dF ClampScrollToMaxScrollOffset(); |
| 434 void SetScrollCompensationAdjustment(const gfx::Vector2dF& scroll_offset) { | |
| 435 scroll_compensation_adjustment_ = scroll_offset; | |
| 436 } | |
| 437 gfx::Vector2dF ScrollCompensationAdjustment() const { | |
| 438 return scroll_compensation_adjustment_; | |
| 439 } | |
| 440 | 434 |
| 441 // Returns the delta of the scroll that was outside of the bounds of the | 435 // Returns the delta of the scroll that was outside of the bounds of the |
| 442 // initial scroll | 436 // initial scroll |
| 443 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); | 437 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); |
| 444 | 438 |
| 445 void SetScrollClipLayer(int scroll_clip_layer_id); | 439 void SetScrollClipLayer(int scroll_clip_layer_id); |
| 446 int scroll_clip_layer_id() const { return scroll_clip_layer_id_; } | 440 int scroll_clip_layer_id() const { return scroll_clip_layer_id_; } |
| 447 LayerImpl* scroll_clip_layer() const; | 441 LayerImpl* scroll_clip_layer() const; |
| 448 bool scrollable() const; | 442 bool scrollable() const; |
| 449 | 443 |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 float opacity_; | 722 float opacity_; |
| 729 SkXfermode::Mode blend_mode_; | 723 SkXfermode::Mode blend_mode_; |
| 730 // draw_blend_mode may be different than blend_mode_, | 724 // draw_blend_mode may be different than blend_mode_, |
| 731 // when a RenderSurface re-parents the layer's blend_mode. | 725 // when a RenderSurface re-parents the layer's blend_mode. |
| 732 SkXfermode::Mode draw_blend_mode_; | 726 SkXfermode::Mode draw_blend_mode_; |
| 733 gfx::PointF position_; | 727 gfx::PointF position_; |
| 734 gfx::Transform transform_; | 728 gfx::Transform transform_; |
| 735 | 729 |
| 736 LayerPositionConstraint position_constraint_; | 730 LayerPositionConstraint position_constraint_; |
| 737 | 731 |
| 738 gfx::Vector2dF scroll_compensation_adjustment_; | |
| 739 | |
| 740 int num_descendants_that_draw_content_; | 732 int num_descendants_that_draw_content_; |
| 741 | 733 |
| 742 gfx::Rect clip_rect_in_target_space_; | 734 gfx::Rect clip_rect_in_target_space_; |
| 743 int transform_tree_index_; | 735 int transform_tree_index_; |
| 744 int effect_tree_index_; | 736 int effect_tree_index_; |
| 745 int clip_tree_index_; | 737 int clip_tree_index_; |
| 746 int scroll_tree_index_; | 738 int scroll_tree_index_; |
| 747 | 739 |
| 748 // The global depth value of the center of the layer. This value is used | 740 // The global depth value of the center of the layer. This value is used |
| 749 // to sort layers from back to front. | 741 // to sort layers from back to front. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 // If true, the layer or one of its descendants has a touch handler. | 786 // If true, the layer or one of its descendants has a touch handler. |
| 795 bool layer_or_descendant_has_touch_handler_; | 787 bool layer_or_descendant_has_touch_handler_; |
| 796 bool sorted_for_recursion_; | 788 bool sorted_for_recursion_; |
| 797 | 789 |
| 798 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 790 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 799 }; | 791 }; |
| 800 | 792 |
| 801 } // namespace cc | 793 } // namespace cc |
| 802 | 794 |
| 803 #endif // CC_LAYERS_LAYER_IMPL_H_ | 795 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |