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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 void SetTouchActionRegion(TouchActionRegion touch_action_region); | 261 void SetTouchActionRegion(TouchActionRegion touch_action_region); |
262 const TouchActionRegion& touch_action_region() const { | 262 const TouchActionRegion& touch_action_region() const { |
263 return inputs_.touch_action_region; | 263 return inputs_.touch_action_region; |
264 } | 264 } |
265 | 265 |
266 void set_did_scroll_callback( | 266 void set_did_scroll_callback( |
267 base::Callback<void(const gfx::ScrollOffset&)> callback) { | 267 base::Callback<void(const gfx::ScrollOffset&)> callback) { |
268 inputs_.did_scroll_callback = std::move(callback); | 268 inputs_.did_scroll_callback = std::move(callback); |
269 } | 269 } |
270 | 270 |
| 271 void SetCacheRenderSurface(bool cache_render_surface); |
| 272 bool cache_render_surface() const { return cache_render_surface_; } |
| 273 |
271 void SetForceRenderSurfaceForTesting(bool force_render_surface); | 274 void SetForceRenderSurfaceForTesting(bool force_render_surface); |
272 bool force_render_surface_for_testing() const { | 275 bool force_render_surface_for_testing() const { |
273 return force_render_surface_for_testing_; | 276 return force_render_surface_for_testing_; |
274 } | 277 } |
275 | 278 |
276 gfx::ScrollOffset CurrentScrollOffset() const { | 279 gfx::ScrollOffset CurrentScrollOffset() const { |
277 return inputs_.scroll_offset; | 280 return inputs_.scroll_offset; |
278 } | 281 } |
279 | 282 |
280 void SetDoubleSided(bool double_sided); | 283 void SetDoubleSided(bool double_sided); |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 int num_descendants_that_draw_content_; | 633 int num_descendants_that_draw_content_; |
631 int transform_tree_index_; | 634 int transform_tree_index_; |
632 int effect_tree_index_; | 635 int effect_tree_index_; |
633 int clip_tree_index_; | 636 int clip_tree_index_; |
634 int scroll_tree_index_; | 637 int scroll_tree_index_; |
635 int property_tree_sequence_number_; | 638 int property_tree_sequence_number_; |
636 gfx::Vector2dF offset_to_transform_parent_; | 639 gfx::Vector2dF offset_to_transform_parent_; |
637 bool should_flatten_transform_from_property_tree_ : 1; | 640 bool should_flatten_transform_from_property_tree_ : 1; |
638 bool draws_content_ : 1; | 641 bool draws_content_ : 1; |
639 bool should_check_backface_visibility_ : 1; | 642 bool should_check_backface_visibility_ : 1; |
| 643 // Force use of and cache render surface. |
| 644 bool cache_render_surface_ : 1; |
640 bool force_render_surface_for_testing_ : 1; | 645 bool force_render_surface_for_testing_ : 1; |
641 bool subtree_property_changed_ : 1; | 646 bool subtree_property_changed_ : 1; |
642 bool may_contain_video_ : 1; | 647 bool may_contain_video_ : 1; |
643 bool needs_show_scrollbars_ : 1; | 648 bool needs_show_scrollbars_ : 1; |
644 // Whether the nodes referred to by *_tree_index_ | 649 // Whether the nodes referred to by *_tree_index_ |
645 // "belong" to this layer. Only applicable if use_layer_lists is false. | 650 // "belong" to this layer. Only applicable if use_layer_lists is false. |
646 bool has_transform_node_ : 1; | 651 bool has_transform_node_ : 1; |
647 // This value is valid only when LayerTreeHost::has_copy_request() is true | 652 // This value is valid only when LayerTreeHost::has_copy_request() is true |
648 bool subtree_has_copy_request_ : 1; | 653 bool subtree_has_copy_request_ : 1; |
649 SkColor safe_opaque_background_color_; | 654 SkColor safe_opaque_background_color_; |
650 std::unique_ptr<std::set<Layer*>> scroll_children_; | 655 std::unique_ptr<std::set<Layer*>> scroll_children_; |
651 | 656 |
652 std::unique_ptr<std::set<Layer*>> clip_children_; | 657 std::unique_ptr<std::set<Layer*>> clip_children_; |
653 | 658 |
654 // These all act like draw properties, so don't need push properties. | 659 // These all act like draw properties, so don't need push properties. |
655 gfx::Rect visible_layer_rect_; | 660 gfx::Rect visible_layer_rect_; |
656 size_t num_unclipped_descendants_; | 661 size_t num_unclipped_descendants_; |
657 | 662 |
658 DISALLOW_COPY_AND_ASSIGN(Layer); | 663 DISALLOW_COPY_AND_ASSIGN(Layer); |
659 }; | 664 }; |
660 | 665 |
661 } // namespace cc | 666 } // namespace cc |
662 | 667 |
663 #endif // CC_LAYERS_LAYER_H_ | 668 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |