OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_DRAW_PROPERTIES_H_ | 5 #ifndef CC_LAYERS_DRAW_PROPERTIES_H_ |
6 #define CC_LAYERS_DRAW_PROPERTIES_H_ | 6 #define CC_LAYERS_DRAW_PROPERTIES_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/gfx/rect.h" | 9 #include "ui/gfx/rect.h" |
10 #include "ui/gfx/transform.h" | 10 #include "ui/gfx/transform.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 target_space_transform_is_animating(false), | 22 target_space_transform_is_animating(false), |
23 screen_space_transform_is_animating(false), | 23 screen_space_transform_is_animating(false), |
24 can_use_lcd_text(false), | 24 can_use_lcd_text(false), |
25 is_clipped(false), | 25 is_clipped(false), |
26 render_target(NULL), | 26 render_target(NULL), |
27 contents_scale_x(1.f), | 27 contents_scale_x(1.f), |
28 contents_scale_y(1.f), | 28 contents_scale_y(1.f), |
29 num_descendants_that_draw_content(0), | 29 num_descendants_that_draw_content(0), |
30 num_unclipped_descendants(0), | 30 num_unclipped_descendants(0), |
31 layer_or_descendant_has_copy_request(false), | 31 layer_or_descendant_has_copy_request(false), |
| 32 layer_or_descendant_has_input_handler(false), |
32 has_child_with_a_scroll_parent(false), | 33 has_child_with_a_scroll_parent(false), |
33 sorted_for_recursion(false), | 34 sorted_for_recursion(false), |
34 index_of_first_descendants_addition(0), | 35 index_of_first_descendants_addition(0), |
35 num_descendants_added(0), | 36 num_descendants_added(0), |
36 index_of_first_render_surface_layer_list_addition(0), | 37 index_of_first_render_surface_layer_list_addition(0), |
37 num_render_surfaces_added(0), | 38 num_render_surfaces_added(0), |
38 last_drawn_render_surface_layer_list_id(0) {} | 39 last_drawn_render_surface_layer_list_id(0) {} |
39 | 40 |
40 // Transforms objects from content space to target surface space, where | 41 // Transforms objects from content space to target surface space, where |
41 // this layer would be drawn. | 42 // this layer would be drawn. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 int num_descendants_that_draw_content; | 96 int num_descendants_that_draw_content; |
96 | 97 |
97 // Number of descendants with a clip parent that is our ancestor. NB - this | 98 // Number of descendants with a clip parent that is our ancestor. NB - this |
98 // does not include our clip children because they are clipped by us. | 99 // does not include our clip children because they are clipped by us. |
99 int num_unclipped_descendants; | 100 int num_unclipped_descendants; |
100 | 101 |
101 // If true, the layer or some layer in its sub-tree has a CopyOutputRequest | 102 // If true, the layer or some layer in its sub-tree has a CopyOutputRequest |
102 // present on it. | 103 // present on it. |
103 bool layer_or_descendant_has_copy_request; | 104 bool layer_or_descendant_has_copy_request; |
104 | 105 |
| 106 // If true, the layer or one of its descendants has a wheel or touch handler. |
| 107 bool layer_or_descendant_has_input_handler; |
| 108 |
105 // This is true if the layer has any direct child that has a scroll parent. | 109 // This is true if the layer has any direct child that has a scroll parent. |
106 // This layer will not be the scroll parent in this case. This information | 110 // This layer will not be the scroll parent in this case. This information |
107 // lets us avoid work in CalculateDrawPropertiesInternal -- if none of our | 111 // lets us avoid work in CalculateDrawPropertiesInternal -- if none of our |
108 // children have scroll parents, we will not need to recur out of order. | 112 // children have scroll parents, we will not need to recur out of order. |
109 bool has_child_with_a_scroll_parent; | 113 bool has_child_with_a_scroll_parent; |
110 | 114 |
111 // This is true if the order (wrt to its siblings in the tree) in which the | 115 // This is true if the order (wrt to its siblings in the tree) in which the |
112 // layer will be visited while computing draw properties has been determined. | 116 // layer will be visited while computing draw properties has been determined. |
113 bool sorted_for_recursion; | 117 bool sorted_for_recursion; |
114 | 118 |
(...skipping 11 matching lines...) Expand all Loading... |
126 // these draw properties and determined that this layer will draw itself. | 130 // these draw properties and determined that this layer will draw itself. |
127 // If these draw properties are not a part of the render surface layer list, | 131 // If these draw properties are not a part of the render surface layer list, |
128 // or the layer doesn't contribute anything, then this ID will be either out | 132 // or the layer doesn't contribute anything, then this ID will be either out |
129 // of date or 0. | 133 // of date or 0. |
130 int last_drawn_render_surface_layer_list_id; | 134 int last_drawn_render_surface_layer_list_id; |
131 }; | 135 }; |
132 | 136 |
133 } // namespace cc | 137 } // namespace cc |
134 | 138 |
135 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ | 139 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ |
OLD | NEW |