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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 | 281 |
282 void SetTouchEventHandlerRegion(const Region& touch_event_handler_region); | 282 void SetTouchEventHandlerRegion(const Region& touch_event_handler_region); |
283 const Region& touch_event_handler_region() const { | 283 const Region& touch_event_handler_region() const { |
284 return touch_event_handler_region_; | 284 return touch_event_handler_region_; |
285 } | 285 } |
286 | 286 |
287 void set_did_scroll_callback(const base::Closure& callback) { | 287 void set_did_scroll_callback(const base::Closure& callback) { |
288 did_scroll_callback_ = callback; | 288 did_scroll_callback_ = callback; |
289 } | 289 } |
290 | 290 |
291 void SetForceRenderSurface(bool force_render_surface); | 291 void SetForceRenderSurfaceForTesting(bool force_render_surface); |
292 bool force_render_surface() const { return force_render_surface_; } | 292 bool force_render_surface_for_testing() const { |
| 293 return force_render_surface_for_testing_; |
| 294 } |
293 | 295 |
294 gfx::ScrollOffset CurrentScrollOffset() const { return scroll_offset_; } | 296 gfx::ScrollOffset CurrentScrollOffset() const { return scroll_offset_; } |
295 | 297 |
296 void SetDoubleSided(bool double_sided); | 298 void SetDoubleSided(bool double_sided); |
297 bool double_sided() const { return double_sided_; } | 299 bool double_sided() const { return double_sided_; } |
298 | 300 |
299 void SetShouldFlattenTransform(bool flatten); | 301 void SetShouldFlattenTransform(bool flatten); |
300 bool should_flatten_transform() const { return should_flatten_transform_; } | 302 bool should_flatten_transform() const { return should_flatten_transform_; } |
301 | 303 |
302 bool Is3dSorted() const { return sorting_context_id_ != 0; } | 304 bool Is3dSorted() const { return sorting_context_id_ != 0; } |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 bool is_drawable_ : 1; | 634 bool is_drawable_ : 1; |
633 bool draws_content_ : 1; | 635 bool draws_content_ : 1; |
634 bool hide_layer_and_subtree_ : 1; | 636 bool hide_layer_and_subtree_ : 1; |
635 bool masks_to_bounds_ : 1; | 637 bool masks_to_bounds_ : 1; |
636 bool contents_opaque_ : 1; | 638 bool contents_opaque_ : 1; |
637 bool double_sided_ : 1; | 639 bool double_sided_ : 1; |
638 bool should_flatten_transform_ : 1; | 640 bool should_flatten_transform_ : 1; |
639 bool use_parent_backface_visibility_ : 1; | 641 bool use_parent_backface_visibility_ : 1; |
640 bool use_local_transform_for_backface_visibility_ : 1; | 642 bool use_local_transform_for_backface_visibility_ : 1; |
641 bool should_check_backface_visibility_ : 1; | 643 bool should_check_backface_visibility_ : 1; |
642 bool force_render_surface_ : 1; | 644 bool force_render_surface_for_testing_ : 1; |
643 bool transform_is_invertible_ : 1; | 645 bool transform_is_invertible_ : 1; |
644 bool has_render_surface_ : 1; | 646 bool has_render_surface_ : 1; |
645 bool subtree_property_changed_ : 1; | 647 bool subtree_property_changed_ : 1; |
646 Region non_fast_scrollable_region_; | 648 Region non_fast_scrollable_region_; |
647 Region touch_event_handler_region_; | 649 Region touch_event_handler_region_; |
648 gfx::PointF position_; | 650 gfx::PointF position_; |
649 SkColor background_color_; | 651 SkColor background_color_; |
650 SkColor safe_opaque_background_color_; | 652 SkColor safe_opaque_background_color_; |
651 float opacity_; | 653 float opacity_; |
652 SkXfermode::Mode blend_mode_; | 654 SkXfermode::Mode blend_mode_; |
(...skipping 26 matching lines...) Expand all Loading... |
679 // These all act like draw properties, so don't need push properties. | 681 // These all act like draw properties, so don't need push properties. |
680 gfx::Rect visible_layer_rect_; | 682 gfx::Rect visible_layer_rect_; |
681 size_t num_unclipped_descendants_; | 683 size_t num_unclipped_descendants_; |
682 | 684 |
683 DISALLOW_COPY_AND_ASSIGN(Layer); | 685 DISALLOW_COPY_AND_ASSIGN(Layer); |
684 }; | 686 }; |
685 | 687 |
686 } // namespace cc | 688 } // namespace cc |
687 | 689 |
688 #endif // CC_LAYERS_LAYER_H_ | 690 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |