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 #include <vector> | 10 #include <vector> |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 gfx::ScrollOffset scroll_offset() const { return scroll_offset_; } | 394 gfx::ScrollOffset scroll_offset() const { return scroll_offset_; } |
395 | 395 |
396 gfx::ScrollOffset MaxScrollOffset() const; | 396 gfx::ScrollOffset MaxScrollOffset() const; |
397 gfx::Vector2dF ClampScrollToMaxScrollOffset(); | 397 gfx::Vector2dF ClampScrollToMaxScrollOffset(); |
398 void SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer, | 398 void SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer, |
399 LayerImpl* scrollbar_clip_layer, | 399 LayerImpl* scrollbar_clip_layer, |
400 bool on_resize) const; | 400 bool on_resize) const; |
401 void SetScrollDelta(const gfx::Vector2dF& scroll_delta); | 401 void SetScrollDelta(const gfx::Vector2dF& scroll_delta); |
402 gfx::Vector2dF ScrollDelta() const; | 402 gfx::Vector2dF ScrollDelta() const; |
403 | 403 |
| 404 void SetMainScrollOffsetFractionalPart(const gfx::Vector2dF& scroll_offset) { |
| 405 main_scroll_offset_fractional_part_ = scroll_offset; |
| 406 } |
| 407 gfx::Vector2dF MainScrollOffsetFractionalPart() const { |
| 408 return main_scroll_offset_fractional_part_; |
| 409 } |
| 410 |
404 gfx::ScrollOffset TotalScrollOffset() const; | 411 gfx::ScrollOffset TotalScrollOffset() const; |
405 | 412 |
406 void SetSentScrollDelta(const gfx::Vector2dF& sent_scroll_delta); | 413 void SetSentScrollDelta(const gfx::Vector2dF& sent_scroll_delta); |
407 gfx::Vector2dF sent_scroll_delta() const { return sent_scroll_delta_; } | 414 gfx::Vector2dF sent_scroll_delta() const { return sent_scroll_delta_; } |
408 | 415 |
409 // Returns the delta of the scroll that was outside of the bounds of the | 416 // Returns the delta of the scroll that was outside of the bounds of the |
410 // initial scroll | 417 // initial scroll |
411 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); | 418 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); |
412 | 419 |
413 void SetScrollClipLayer(int scroll_clip_layer_id); | 420 void SetScrollClipLayer(int scroll_clip_layer_id); |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 SkXfermode::Mode blend_mode_; | 675 SkXfermode::Mode blend_mode_; |
669 gfx::PointF position_; | 676 gfx::PointF position_; |
670 gfx::Transform transform_; | 677 gfx::Transform transform_; |
671 | 678 |
672 LayerPositionConstraint position_constraint_; | 679 LayerPositionConstraint position_constraint_; |
673 | 680 |
674 gfx::Vector2dF scroll_delta_; | 681 gfx::Vector2dF scroll_delta_; |
675 gfx::Vector2dF sent_scroll_delta_; | 682 gfx::Vector2dF sent_scroll_delta_; |
676 gfx::ScrollOffset last_scroll_offset_; | 683 gfx::ScrollOffset last_scroll_offset_; |
677 | 684 |
| 685 gfx::Vector2dF main_scroll_offset_fractional_part_; |
| 686 |
678 int num_descendants_that_draw_content_; | 687 int num_descendants_that_draw_content_; |
679 | 688 |
680 // The global depth value of the center of the layer. This value is used | 689 // The global depth value of the center of the layer. This value is used |
681 // to sort layers from back to front. | 690 // to sort layers from back to front. |
682 float draw_depth_; | 691 float draw_depth_; |
683 | 692 |
684 FilterOperations filters_; | 693 FilterOperations filters_; |
685 FilterOperations background_filters_; | 694 FilterOperations background_filters_; |
686 | 695 |
687 protected: | 696 protected: |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 | 740 |
732 std::vector<FrameTimingRequest> frame_timing_requests_; | 741 std::vector<FrameTimingRequest> frame_timing_requests_; |
733 bool frame_timing_requests_dirty_; | 742 bool frame_timing_requests_dirty_; |
734 | 743 |
735 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 744 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
736 }; | 745 }; |
737 | 746 |
738 } // namespace cc | 747 } // namespace cc |
739 | 748 |
740 #endif // CC_LAYERS_LAYER_IMPL_H_ | 749 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |