| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_H_ | 5 #ifndef CC_LAYERS_LAYER_H_ |
| 6 #define CC_LAYERS_LAYER_H_ | 6 #define CC_LAYERS_LAYER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 DCHECK(!draw_properties_.render_target || | 259 DCHECK(!draw_properties_.render_target || |
| 260 draw_properties_.render_target->render_surface()); | 260 draw_properties_.render_target->render_surface()); |
| 261 return draw_properties_.render_target; | 261 return draw_properties_.render_target; |
| 262 } | 262 } |
| 263 int num_unclipped_descendants() const { | 263 int num_unclipped_descendants() const { |
| 264 return draw_properties_.num_unclipped_descendants; | 264 return draw_properties_.num_unclipped_descendants; |
| 265 } | 265 } |
| 266 | 266 |
| 267 RenderSurface* render_surface() const { return render_surface_.get(); } | 267 RenderSurface* render_surface() const { return render_surface_.get(); } |
| 268 void SetScrollOffset(const gfx::ScrollOffset& scroll_offset); | 268 void SetScrollOffset(const gfx::ScrollOffset& scroll_offset); |
| 269 void SetScrollOffsetFractionalPart( |
| 270 const gfx::Vector2dF& scroll_offset_fractional_part); |
| 271 gfx::Vector2dF MainScrollOffsetFractionalPart() const; |
| 272 |
| 269 gfx::ScrollOffset scroll_offset() const { return scroll_offset_; } | 273 gfx::ScrollOffset scroll_offset() const { return scroll_offset_; } |
| 270 void SetScrollOffsetFromImplSide(const gfx::ScrollOffset& scroll_offset); | 274 void SetScrollOffsetFromImplSide(const gfx::ScrollOffset& scroll_offset); |
| 271 | 275 |
| 272 void SetScrollClipLayerId(int clip_layer_id); | 276 void SetScrollClipLayerId(int clip_layer_id); |
| 273 bool scrollable() const { return scroll_clip_layer_id_ != INVALID_ID; } | 277 bool scrollable() const { return scroll_clip_layer_id_ != INVALID_ID; } |
| 274 | 278 |
| 275 void SetUserScrollable(bool horizontal, bool vertical); | 279 void SetUserScrollable(bool horizontal, bool vertical); |
| 276 bool user_scrollable_horizontal() const { | 280 bool user_scrollable_horizontal() const { |
| 277 return user_scrollable_horizontal_; | 281 return user_scrollable_horizontal_; |
| 278 } | 282 } |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 // This pointer value is nil when a Layer is not in a tree and is | 633 // This pointer value is nil when a Layer is not in a tree and is |
| 630 // updated via SetLayerTreeHost() if a layer moves between trees. | 634 // updated via SetLayerTreeHost() if a layer moves between trees. |
| 631 LayerTreeHost* layer_tree_host_; | 635 LayerTreeHost* layer_tree_host_; |
| 632 | 636 |
| 633 scoped_refptr<LayerAnimationController> layer_animation_controller_; | 637 scoped_refptr<LayerAnimationController> layer_animation_controller_; |
| 634 | 638 |
| 635 // Layer properties. | 639 // Layer properties. |
| 636 gfx::Size bounds_; | 640 gfx::Size bounds_; |
| 637 | 641 |
| 638 gfx::ScrollOffset scroll_offset_; | 642 gfx::ScrollOffset scroll_offset_; |
| 643 gfx::Vector2dF scroll_offset_fractional_part_; |
| 639 // This variable indicates which ancestor layer (if any) whose size, | 644 // This variable indicates which ancestor layer (if any) whose size, |
| 640 // transformed relative to this layer, defines the maximum scroll offset for | 645 // transformed relative to this layer, defines the maximum scroll offset for |
| 641 // this layer. | 646 // this layer. |
| 642 int scroll_clip_layer_id_; | 647 int scroll_clip_layer_id_; |
| 643 int num_descendants_that_draw_content_; | 648 int num_descendants_that_draw_content_; |
| 644 int transform_tree_index_; | 649 int transform_tree_index_; |
| 645 int opacity_tree_index_; | 650 int opacity_tree_index_; |
| 646 int clip_tree_index_; | 651 int clip_tree_index_; |
| 647 gfx::Vector2dF offset_to_transform_parent_; | 652 gfx::Vector2dF offset_to_transform_parent_; |
| 648 bool should_scroll_on_main_thread_ : 1; | 653 bool should_scroll_on_main_thread_ : 1; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 | 710 |
| 706 std::vector<FrameTimingRequest> frame_timing_requests_; | 711 std::vector<FrameTimingRequest> frame_timing_requests_; |
| 707 bool frame_timing_requests_dirty_; | 712 bool frame_timing_requests_dirty_; |
| 708 | 713 |
| 709 DISALLOW_COPY_AND_ASSIGN(Layer); | 714 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 710 }; | 715 }; |
| 711 | 716 |
| 712 } // namespace cc | 717 } // namespace cc |
| 713 | 718 |
| 714 #endif // CC_LAYERS_LAYER_H_ | 719 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |