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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 void SetTouchEventHandlerRegion(const Region& touch_event_handler_region); | 245 void SetTouchEventHandlerRegion(const Region& touch_event_handler_region); |
246 const Region& touch_event_handler_region() const { | 246 const Region& touch_event_handler_region() const { |
247 return inputs_.touch_event_handler_region; | 247 return inputs_.touch_event_handler_region; |
248 } | 248 } |
249 | 249 |
250 void set_did_scroll_callback( | 250 void set_did_scroll_callback( |
251 const base::Callback<void(const gfx::ScrollOffset&)>& callback) { | 251 const base::Callback<void(const gfx::ScrollOffset&)>& callback) { |
252 inputs_.did_scroll_callback = callback; | 252 inputs_.did_scroll_callback = callback; |
253 } | 253 } |
254 | 254 |
255 void SetForceRenderSurfaceForTesting(bool force_render_surface); | 255 void SetForceRenderSurface(bool force_render_surface); |
256 bool force_render_surface_for_testing() const { | 256 bool force_render_surface() const { return force_render_surface_; } |
257 return force_render_surface_for_testing_; | |
258 } | |
259 | 257 |
260 gfx::ScrollOffset CurrentScrollOffset() const { | 258 gfx::ScrollOffset CurrentScrollOffset() const { |
261 return inputs_.scroll_offset; | 259 return inputs_.scroll_offset; |
262 } | 260 } |
263 | 261 |
264 void SetDoubleSided(bool double_sided); | 262 void SetDoubleSided(bool double_sided); |
265 bool double_sided() const { return inputs_.double_sided; } | 263 bool double_sided() const { return inputs_.double_sided; } |
266 | 264 |
267 void SetShouldFlattenTransform(bool flatten); | 265 void SetShouldFlattenTransform(bool flatten); |
268 bool should_flatten_transform() const { | 266 bool should_flatten_transform() const { |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 int transform_tree_index_; | 613 int transform_tree_index_; |
616 int effect_tree_index_; | 614 int effect_tree_index_; |
617 int clip_tree_index_; | 615 int clip_tree_index_; |
618 int scroll_tree_index_; | 616 int scroll_tree_index_; |
619 int property_tree_sequence_number_; | 617 int property_tree_sequence_number_; |
620 gfx::Vector2dF offset_to_transform_parent_; | 618 gfx::Vector2dF offset_to_transform_parent_; |
621 bool should_flatten_transform_from_property_tree_ : 1; | 619 bool should_flatten_transform_from_property_tree_ : 1; |
622 bool draws_content_ : 1; | 620 bool draws_content_ : 1; |
623 bool use_local_transform_for_backface_visibility_ : 1; | 621 bool use_local_transform_for_backface_visibility_ : 1; |
624 bool should_check_backface_visibility_ : 1; | 622 bool should_check_backface_visibility_ : 1; |
625 bool force_render_surface_for_testing_ : 1; | 623 bool force_render_surface_ : 1; |
626 bool subtree_property_changed_ : 1; | 624 bool subtree_property_changed_ : 1; |
627 bool may_contain_video_ : 1; | 625 bool may_contain_video_ : 1; |
628 bool is_scroll_clip_layer_ : 1; | 626 bool is_scroll_clip_layer_ : 1; |
629 bool needs_show_scrollbars_ : 1; | 627 bool needs_show_scrollbars_ : 1; |
630 // This value is valid only when LayerTreeHost::has_copy_request() is true | 628 // This value is valid only when LayerTreeHost::has_copy_request() is true |
631 bool subtree_has_copy_request_ : 1; | 629 bool subtree_has_copy_request_ : 1; |
632 SkColor safe_opaque_background_color_; | 630 SkColor safe_opaque_background_color_; |
633 std::unique_ptr<std::set<Layer*>> scroll_children_; | 631 std::unique_ptr<std::set<Layer*>> scroll_children_; |
634 | 632 |
635 std::unique_ptr<std::set<Layer*>> clip_children_; | 633 std::unique_ptr<std::set<Layer*>> clip_children_; |
636 | 634 |
637 PaintProperties paint_properties_; | 635 PaintProperties paint_properties_; |
638 | 636 |
639 // These all act like draw properties, so don't need push properties. | 637 // These all act like draw properties, so don't need push properties. |
640 gfx::Rect visible_layer_rect_; | 638 gfx::Rect visible_layer_rect_; |
641 size_t num_unclipped_descendants_; | 639 size_t num_unclipped_descendants_; |
642 | 640 |
643 DISALLOW_COPY_AND_ASSIGN(Layer); | 641 DISALLOW_COPY_AND_ASSIGN(Layer); |
644 }; | 642 }; |
645 | 643 |
646 } // namespace cc | 644 } // namespace cc |
647 | 645 |
648 #endif // CC_LAYERS_LAYER_H_ | 646 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |