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 | 10 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 return draw_properties_.render_surface.get(); | 238 return draw_properties_.render_surface.get(); |
239 } | 239 } |
240 int num_unclipped_descendants() const { | 240 int num_unclipped_descendants() const { |
241 return draw_properties_.num_unclipped_descendants; | 241 return draw_properties_.num_unclipped_descendants; |
242 } | 242 } |
243 | 243 |
244 void SetScrollOffset(gfx::Vector2d scroll_offset); | 244 void SetScrollOffset(gfx::Vector2d scroll_offset); |
245 gfx::Vector2d scroll_offset() const { return scroll_offset_; } | 245 gfx::Vector2d scroll_offset() const { return scroll_offset_; } |
246 void SetScrollOffsetFromImplSide(gfx::Vector2d scroll_offset); | 246 void SetScrollOffsetFromImplSide(gfx::Vector2d scroll_offset); |
247 | 247 |
248 void SetMaxScrollOffset(gfx::Vector2d max_scroll_offset); | 248 gfx::Vector2d MaxScrollOffset() const; |
249 gfx::Vector2d max_scroll_offset() const { return max_scroll_offset_; } | 249 gfx::Vector2d TotalViewportScrollOffset() const; |
250 | 250 |
251 void SetScrollable(bool scrollable); | 251 void SetScrollable(Layer* clip_layer); |
252 bool scrollable() const { return scrollable_; } | 252 bool scrollable() const { return clip_layer_; } |
253 | 253 |
254 void SetUserScrollable(bool horizontal, bool vertical); | 254 void SetUserScrollable(bool horizontal, bool vertical); |
255 bool user_scrollable_horizontal() const { | 255 bool user_scrollable_horizontal() const { |
256 return user_scrollable_horizontal_; | 256 return user_scrollable_horizontal_; |
257 } | 257 } |
258 bool user_scrollable_vertical() const { return user_scrollable_vertical_; } | 258 bool user_scrollable_vertical() const { return user_scrollable_vertical_; } |
259 | 259 |
260 void SetShouldScrollOnMainThread(bool should_scroll_on_main_thread); | 260 void SetShouldScrollOnMainThread(bool should_scroll_on_main_thread); |
261 bool should_scroll_on_main_thread() const { | 261 bool should_scroll_on_main_thread() const { |
262 return should_scroll_on_main_thread_; | 262 return should_scroll_on_main_thread_; |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 // This pointer value is nil when a Layer is not in a tree and is | 531 // This pointer value is nil when a Layer is not in a tree and is |
532 // updated via SetLayerTreeHost() if a layer moves between trees. | 532 // updated via SetLayerTreeHost() if a layer moves between trees. |
533 LayerTreeHost* layer_tree_host_; | 533 LayerTreeHost* layer_tree_host_; |
534 | 534 |
535 scoped_refptr<LayerAnimationController> layer_animation_controller_; | 535 scoped_refptr<LayerAnimationController> layer_animation_controller_; |
536 | 536 |
537 // Layer properties. | 537 // Layer properties. |
538 gfx::Size bounds_; | 538 gfx::Size bounds_; |
539 | 539 |
540 gfx::Vector2d scroll_offset_; | 540 gfx::Vector2d scroll_offset_; |
541 gfx::Vector2d max_scroll_offset_; | 541 Layer* clip_layer_; |
542 bool scrollable_; | |
543 bool should_scroll_on_main_thread_; | 542 bool should_scroll_on_main_thread_; |
544 bool have_wheel_event_handlers_; | 543 bool have_wheel_event_handlers_; |
545 bool user_scrollable_horizontal_; | 544 bool user_scrollable_horizontal_; |
546 bool user_scrollable_vertical_; | 545 bool user_scrollable_vertical_; |
547 Region non_fast_scrollable_region_; | 546 Region non_fast_scrollable_region_; |
548 Region touch_event_handler_region_; | 547 Region touch_event_handler_region_; |
549 gfx::PointF position_; | 548 gfx::PointF position_; |
550 gfx::PointF anchor_point_; | 549 gfx::PointF anchor_point_; |
551 SkColor background_color_; | 550 SkColor background_color_; |
552 CompositingReasons compositing_reasons_; | 551 CompositingReasons compositing_reasons_; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 DrawProperties<Layer> draw_properties_; | 588 DrawProperties<Layer> draw_properties_; |
590 | 589 |
591 PaintProperties paint_properties_; | 590 PaintProperties paint_properties_; |
592 | 591 |
593 DISALLOW_COPY_AND_ASSIGN(Layer); | 592 DISALLOW_COPY_AND_ASSIGN(Layer); |
594 }; | 593 }; |
595 | 594 |
596 } // namespace cc | 595 } // namespace cc |
597 | 596 |
598 #endif // CC_LAYERS_LAYER_H_ | 597 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |