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 16 matching lines...) Expand all Loading... |
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 can_draw_directly_to_backbuffer(false), | 31 can_draw_directly_to_backbuffer(false), |
32 layer_or_descendant_has_copy_request(false), | 32 layer_or_descendant_has_copy_request(false), |
33 sorted_for_recursion(false), | 33 sorted_for_recursion(false), |
34 index_of_first_descendants_addition(0), | 34 index_of_first_descendants_addition(0), |
35 num_descendants_added(0), | 35 num_descendants_added(0), |
36 index_of_first_render_surface_layer_list_addition(0), | 36 index_of_first_render_surface_layer_list_addition(0), |
37 num_render_surfaces_added(0) {} | 37 num_render_surfaces_added(0), |
| 38 layer_or_descendant_has_event_handler(false) {} |
38 | 39 |
39 // Transforms objects from content space to target surface space, where | 40 // Transforms objects from content space to target surface space, where |
40 // this layer would be drawn. | 41 // this layer would be drawn. |
41 gfx::Transform target_space_transform; | 42 gfx::Transform target_space_transform; |
42 | 43 |
43 // Transforms objects from content space to screen space (viewport space). | 44 // Transforms objects from content space to screen space (viewport space). |
44 gfx::Transform screen_space_transform; | 45 gfx::Transform screen_space_transform; |
45 | 46 |
46 // DrawProperties::opacity may be different than LayerType::opacity, | 47 // DrawProperties::opacity may be different than LayerType::opacity, |
47 // particularly in the case when a RenderSurface re-parents the layer's | 48 // particularly in the case when a RenderSurface re-parents the layer's |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // layer will be visited while computing draw properties has been determined. | 108 // layer will be visited while computing draw properties has been determined. |
108 bool sorted_for_recursion; | 109 bool sorted_for_recursion; |
109 | 110 |
110 // If this layer is visited out of order, its contribution to the descendant | 111 // If this layer is visited out of order, its contribution to the descendant |
111 // and render surface layer lists will be put aside in a temporary list. | 112 // and render surface layer lists will be put aside in a temporary list. |
112 // These values will allow for an efficient reordering of these additions. | 113 // These values will allow for an efficient reordering of these additions. |
113 size_t index_of_first_descendants_addition; | 114 size_t index_of_first_descendants_addition; |
114 size_t num_descendants_added; | 115 size_t num_descendants_added; |
115 size_t index_of_first_render_surface_layer_list_addition; | 116 size_t index_of_first_render_surface_layer_list_addition; |
116 size_t num_render_surfaces_added; | 117 size_t num_render_surfaces_added; |
| 118 |
| 119 // If true, the layer or some layer in its sub-tree has mousewheel or touch |
| 120 // event handlers, |
| 121 bool layer_or_descendant_has_event_handler; |
117 }; | 122 }; |
118 | 123 |
119 } // namespace cc | 124 } // namespace cc |
120 | 125 |
121 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ | 126 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ |
OLD | NEW |