Chromium Code Reviews| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 242 void SetTouchEventHandlerRegion(const Region& touch_event_handler_region); | 242 void SetTouchEventHandlerRegion(const Region& touch_event_handler_region); |
| 243 const Region& touch_event_handler_region() const { | 243 const Region& touch_event_handler_region() const { |
| 244 return inputs_.touch_event_handler_region; | 244 return inputs_.touch_event_handler_region; |
| 245 } | 245 } |
| 246 | 246 |
| 247 void set_did_scroll_callback( | 247 void set_did_scroll_callback( |
| 248 const base::Callback<void(const gfx::ScrollOffset&)>& callback) { | 248 const base::Callback<void(const gfx::ScrollOffset&)>& callback) { |
| 249 inputs_.did_scroll_callback = callback; | 249 inputs_.did_scroll_callback = callback; |
| 250 } | 250 } |
| 251 | 251 |
| 252 void SetForceRenderSurfaceForTesting(bool force_render_surface); | 252 void SetForceRenderSurface(bool force_render_surface); |
|
weiliangc
2017/06/07 21:19:00
Preferably a different name to distinguish old for
wutao
2017/06/09 02:31:32
As discussed offline, will call the API cache_rend
| |
| 253 bool force_render_surface_for_testing() const { | 253 bool force_render_surface() const { return force_render_surface_; } |
| 254 return force_render_surface_for_testing_; | |
| 255 } | |
| 256 | 254 |
| 257 gfx::ScrollOffset CurrentScrollOffset() const { | 255 gfx::ScrollOffset CurrentScrollOffset() const { |
| 258 return inputs_.scroll_offset; | 256 return inputs_.scroll_offset; |
| 259 } | 257 } |
| 260 | 258 |
| 261 void SetDoubleSided(bool double_sided); | 259 void SetDoubleSided(bool double_sided); |
| 262 bool double_sided() const { return inputs_.double_sided; } | 260 bool double_sided() const { return inputs_.double_sided; } |
| 263 | 261 |
| 264 void SetShouldFlattenTransform(bool flatten); | 262 void SetShouldFlattenTransform(bool flatten); |
| 265 bool should_flatten_transform() const { | 263 bool should_flatten_transform() const { |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 608 int transform_tree_index_; | 606 int transform_tree_index_; |
| 609 int effect_tree_index_; | 607 int effect_tree_index_; |
| 610 int clip_tree_index_; | 608 int clip_tree_index_; |
| 611 int scroll_tree_index_; | 609 int scroll_tree_index_; |
| 612 int property_tree_sequence_number_; | 610 int property_tree_sequence_number_; |
| 613 gfx::Vector2dF offset_to_transform_parent_; | 611 gfx::Vector2dF offset_to_transform_parent_; |
| 614 bool should_flatten_transform_from_property_tree_ : 1; | 612 bool should_flatten_transform_from_property_tree_ : 1; |
| 615 bool draws_content_ : 1; | 613 bool draws_content_ : 1; |
| 616 bool use_local_transform_for_backface_visibility_ : 1; | 614 bool use_local_transform_for_backface_visibility_ : 1; |
| 617 bool should_check_backface_visibility_ : 1; | 615 bool should_check_backface_visibility_ : 1; |
| 618 bool force_render_surface_for_testing_ : 1; | 616 bool force_render_surface_ : 1; |
| 619 bool subtree_property_changed_ : 1; | 617 bool subtree_property_changed_ : 1; |
| 620 bool may_contain_video_ : 1; | 618 bool may_contain_video_ : 1; |
| 621 bool is_scroll_clip_layer_ : 1; | 619 bool is_scroll_clip_layer_ : 1; |
| 622 bool needs_show_scrollbars_ : 1; | 620 bool needs_show_scrollbars_ : 1; |
| 623 // This value is valid only when LayerTreeHost::has_copy_request() is true | 621 // This value is valid only when LayerTreeHost::has_copy_request() is true |
| 624 bool subtree_has_copy_request_ : 1; | 622 bool subtree_has_copy_request_ : 1; |
| 625 SkColor safe_opaque_background_color_; | 623 SkColor safe_opaque_background_color_; |
| 626 std::unique_ptr<std::set<Layer*>> scroll_children_; | 624 std::unique_ptr<std::set<Layer*>> scroll_children_; |
| 627 | 625 |
| 628 std::unique_ptr<std::set<Layer*>> clip_children_; | 626 std::unique_ptr<std::set<Layer*>> clip_children_; |
| 629 | 627 |
| 630 // These all act like draw properties, so don't need push properties. | 628 // These all act like draw properties, so don't need push properties. |
| 631 gfx::Rect visible_layer_rect_; | 629 gfx::Rect visible_layer_rect_; |
| 632 size_t num_unclipped_descendants_; | 630 size_t num_unclipped_descendants_; |
| 633 | 631 |
| 634 DISALLOW_COPY_AND_ASSIGN(Layer); | 632 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 635 }; | 633 }; |
| 636 | 634 |
| 637 } // namespace cc | 635 } // namespace cc |
| 638 | 636 |
| 639 #endif // CC_LAYERS_LAYER_H_ | 637 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |