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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 // This pointer value is nil when a Layer is not in a tree and is | 533 // This pointer value is nil when a Layer is not in a tree and is |
534 // updated via SetLayerTreeHost() if a layer moves between trees. | 534 // updated via SetLayerTreeHost() if a layer moves between trees. |
535 LayerTreeHost* layer_tree_host_; | 535 LayerTreeHost* layer_tree_host_; |
536 | 536 |
537 scoped_refptr<LayerAnimationController> layer_animation_controller_; | 537 scoped_refptr<LayerAnimationController> layer_animation_controller_; |
538 | 538 |
539 // Layer properties. | 539 // Layer properties. |
540 gfx::Size bounds_; | 540 gfx::Size bounds_; |
541 | 541 |
542 gfx::Vector2d scroll_offset_; | 542 gfx::Vector2d scroll_offset_; |
543 gfx::Vector2d max_scroll_offset_; | 543 Layer* clip_layer_; |
544 bool scrollable_; | |
545 bool should_scroll_on_main_thread_; | 544 bool should_scroll_on_main_thread_; |
546 bool have_wheel_event_handlers_; | 545 bool have_wheel_event_handlers_; |
547 bool user_scrollable_horizontal_; | 546 bool user_scrollable_horizontal_; |
548 bool user_scrollable_vertical_; | 547 bool user_scrollable_vertical_; |
549 Region non_fast_scrollable_region_; | 548 Region non_fast_scrollable_region_; |
550 Region touch_event_handler_region_; | 549 Region touch_event_handler_region_; |
551 gfx::PointF position_; | 550 gfx::PointF position_; |
552 gfx::PointF anchor_point_; | 551 gfx::PointF anchor_point_; |
553 SkColor background_color_; | 552 SkColor background_color_; |
554 CompositingReasons compositing_reasons_; | 553 CompositingReasons compositing_reasons_; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 DrawProperties<Layer> draw_properties_; | 590 DrawProperties<Layer> draw_properties_; |
592 | 591 |
593 PaintProperties paint_properties_; | 592 PaintProperties paint_properties_; |
594 | 593 |
595 DISALLOW_COPY_AND_ASSIGN(Layer); | 594 DISALLOW_COPY_AND_ASSIGN(Layer); |
596 }; | 595 }; |
597 | 596 |
598 } // namespace cc | 597 } // namespace cc |
599 | 598 |
600 #endif // CC_LAYERS_LAYER_H_ | 599 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |