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( | 269 void SetScrollCompensationAdjustment( |
270 const gfx::Vector2dF& scroll_offset_fractional_part); | 270 const gfx::Vector2dF& scroll_compensation_adjustment); |
271 gfx::Vector2dF MainScrollOffsetFractionalPart() const; | 271 gfx::Vector2dF ScrollCompensationAdjustment() const; |
272 | 272 |
273 gfx::ScrollOffset scroll_offset() const { return scroll_offset_; } | 273 gfx::ScrollOffset scroll_offset() const { return scroll_offset_; } |
274 void SetScrollOffsetFromImplSide(const gfx::ScrollOffset& scroll_offset); | 274 void SetScrollOffsetFromImplSide(const gfx::ScrollOffset& scroll_offset); |
275 | 275 |
276 void SetScrollClipLayerId(int clip_layer_id); | 276 void SetScrollClipLayerId(int clip_layer_id); |
277 bool scrollable() const { return scroll_clip_layer_id_ != INVALID_ID; } | 277 bool scrollable() const { return scroll_clip_layer_id_ != INVALID_ID; } |
278 | 278 |
279 void SetUserScrollable(bool horizontal, bool vertical); | 279 void SetUserScrollable(bool horizontal, bool vertical); |
280 bool user_scrollable_horizontal() const { | 280 bool user_scrollable_horizontal() const { |
281 return user_scrollable_horizontal_; | 281 return user_scrollable_horizontal_; |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 // 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 |
634 // updated via SetLayerTreeHost() if a layer moves between trees. | 634 // updated via SetLayerTreeHost() if a layer moves between trees. |
635 LayerTreeHost* layer_tree_host_; | 635 LayerTreeHost* layer_tree_host_; |
636 | 636 |
637 scoped_refptr<LayerAnimationController> layer_animation_controller_; | 637 scoped_refptr<LayerAnimationController> layer_animation_controller_; |
638 | 638 |
639 // Layer properties. | 639 // Layer properties. |
640 gfx::Size bounds_; | 640 gfx::Size bounds_; |
641 | 641 |
642 gfx::ScrollOffset scroll_offset_; | 642 gfx::ScrollOffset scroll_offset_; |
643 gfx::Vector2dF scroll_offset_fractional_part_; | 643 gfx::Vector2dF scroll_compensation_adjustment_; |
644 // This variable indicates which ancestor layer (if any) whose size, | 644 // This variable indicates which ancestor layer (if any) whose size, |
645 // transformed relative to this layer, defines the maximum scroll offset for | 645 // transformed relative to this layer, defines the maximum scroll offset for |
646 // this layer. | 646 // this layer. |
647 int scroll_clip_layer_id_; | 647 int scroll_clip_layer_id_; |
648 int num_descendants_that_draw_content_; | 648 int num_descendants_that_draw_content_; |
649 int transform_tree_index_; | 649 int transform_tree_index_; |
650 int opacity_tree_index_; | 650 int opacity_tree_index_; |
651 int clip_tree_index_; | 651 int clip_tree_index_; |
652 gfx::Vector2dF offset_to_transform_parent_; | 652 gfx::Vector2dF offset_to_transform_parent_; |
653 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... |
710 | 710 |
711 std::vector<FrameTimingRequest> frame_timing_requests_; | 711 std::vector<FrameTimingRequest> frame_timing_requests_; |
712 bool frame_timing_requests_dirty_; | 712 bool frame_timing_requests_dirty_; |
713 | 713 |
714 DISALLOW_COPY_AND_ASSIGN(Layer); | 714 DISALLOW_COPY_AND_ASSIGN(Layer); |
715 }; | 715 }; |
716 | 716 |
717 } // namespace cc | 717 } // namespace cc |
718 | 718 |
719 #endif // CC_LAYERS_LAYER_H_ | 719 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |