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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 void SetTouchActionRegion(TouchActionRegion touch_action_region); | 252 void SetTouchActionRegion(TouchActionRegion touch_action_region); |
253 const TouchActionRegion& touch_action_region() const { | 253 const TouchActionRegion& touch_action_region() const { |
254 return inputs_.touch_action_region; | 254 return inputs_.touch_action_region; |
255 } | 255 } |
256 | 256 |
257 void set_did_scroll_callback( | 257 void set_did_scroll_callback( |
258 base::Callback<void(const gfx::ScrollOffset&)> callback) { | 258 base::Callback<void(const gfx::ScrollOffset&)> callback) { |
259 inputs_.did_scroll_callback = std::move(callback); | 259 inputs_.did_scroll_callback = std::move(callback); |
260 } | 260 } |
261 | 261 |
| 262 void SetCacheRenderSurface(bool cache_render_surface); |
| 263 bool cache_render_surface() const { return cache_render_surface_; } |
| 264 |
262 void SetForceRenderSurfaceForTesting(bool force_render_surface); | 265 void SetForceRenderSurfaceForTesting(bool force_render_surface); |
263 bool force_render_surface_for_testing() const { | 266 bool force_render_surface_for_testing() const { |
264 return force_render_surface_for_testing_; | 267 return force_render_surface_for_testing_; |
265 } | 268 } |
266 | 269 |
267 gfx::ScrollOffset CurrentScrollOffset() const { | 270 gfx::ScrollOffset CurrentScrollOffset() const { |
268 return inputs_.scroll_offset; | 271 return inputs_.scroll_offset; |
269 } | 272 } |
270 | 273 |
271 void SetDoubleSided(bool double_sided); | 274 void SetDoubleSided(bool double_sided); |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 int num_descendants_that_draw_content_; | 623 int num_descendants_that_draw_content_; |
621 int transform_tree_index_; | 624 int transform_tree_index_; |
622 int effect_tree_index_; | 625 int effect_tree_index_; |
623 int clip_tree_index_; | 626 int clip_tree_index_; |
624 int scroll_tree_index_; | 627 int scroll_tree_index_; |
625 int property_tree_sequence_number_; | 628 int property_tree_sequence_number_; |
626 gfx::Vector2dF offset_to_transform_parent_; | 629 gfx::Vector2dF offset_to_transform_parent_; |
627 bool should_flatten_transform_from_property_tree_ : 1; | 630 bool should_flatten_transform_from_property_tree_ : 1; |
628 bool draws_content_ : 1; | 631 bool draws_content_ : 1; |
629 bool should_check_backface_visibility_ : 1; | 632 bool should_check_backface_visibility_ : 1; |
| 633 // Force use of and cache render surface. |
| 634 bool cache_render_surface_ : 1; |
630 bool force_render_surface_for_testing_ : 1; | 635 bool force_render_surface_for_testing_ : 1; |
631 bool subtree_property_changed_ : 1; | 636 bool subtree_property_changed_ : 1; |
632 bool may_contain_video_ : 1; | 637 bool may_contain_video_ : 1; |
633 bool needs_show_scrollbars_ : 1; | 638 bool needs_show_scrollbars_ : 1; |
634 // Whether the nodes referred to by *_tree_index_ | 639 // Whether the nodes referred to by *_tree_index_ |
635 // "belong" to this layer. Only applicable if use_layer_lists is false. | 640 // "belong" to this layer. Only applicable if use_layer_lists is false. |
636 bool has_transform_node_ : 1; | 641 bool has_transform_node_ : 1; |
637 // This value is valid only when LayerTreeHost::has_copy_request() is true | 642 // This value is valid only when LayerTreeHost::has_copy_request() is true |
638 bool subtree_has_copy_request_ : 1; | 643 bool subtree_has_copy_request_ : 1; |
639 SkColor safe_opaque_background_color_; | 644 SkColor safe_opaque_background_color_; |
640 std::unique_ptr<std::set<Layer*>> scroll_children_; | 645 std::unique_ptr<std::set<Layer*>> scroll_children_; |
641 | 646 |
642 std::unique_ptr<std::set<Layer*>> clip_children_; | 647 std::unique_ptr<std::set<Layer*>> clip_children_; |
643 | 648 |
644 // These all act like draw properties, so don't need push properties. | 649 // These all act like draw properties, so don't need push properties. |
645 gfx::Rect visible_layer_rect_; | 650 gfx::Rect visible_layer_rect_; |
646 size_t num_unclipped_descendants_; | 651 size_t num_unclipped_descendants_; |
647 | 652 |
648 DISALLOW_COPY_AND_ASSIGN(Layer); | 653 DISALLOW_COPY_AND_ASSIGN(Layer); |
649 }; | 654 }; |
650 | 655 |
651 } // namespace cc | 656 } // namespace cc |
652 | 657 |
653 #endif // CC_LAYERS_LAYER_H_ | 658 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |