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 17 matching lines...) Expand all Loading... |
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 has_child_with_a_scroll_parent(false), | 33 has_child_with_a_scroll_parent(false), |
34 sorted_for_recursion(false), | 34 sorted_for_recursion(false), |
35 index_of_first_descendants_addition(0), | 35 index_of_first_descendants_addition(0), |
36 num_descendants_added(0), | 36 num_descendants_added(0), |
37 index_of_first_render_surface_layer_list_addition(0), | 37 index_of_first_render_surface_layer_list_addition(0), |
38 num_render_surfaces_added(0) {} | 38 num_render_surfaces_added(0), |
| 39 skip_drawing(false) {} |
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. |
42 gfx::Transform target_space_transform; | 43 gfx::Transform target_space_transform; |
43 | 44 |
44 // Transforms objects from content space to screen space (viewport space). | 45 // Transforms objects from content space to screen space (viewport space). |
45 gfx::Transform screen_space_transform; | 46 gfx::Transform screen_space_transform; |
46 | 47 |
47 // DrawProperties::opacity may be different than LayerType::opacity, | 48 // DrawProperties::opacity may be different than LayerType::opacity, |
48 // particularly in the case when a RenderSurface re-parents the layer's | 49 // particularly in the case when a RenderSurface re-parents the layer's |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // layer will be visited while computing draw properties has been determined. | 115 // layer will be visited while computing draw properties has been determined. |
115 bool sorted_for_recursion; | 116 bool sorted_for_recursion; |
116 | 117 |
117 // If this layer is visited out of order, its contribution to the descendant | 118 // If this layer is visited out of order, its contribution to the descendant |
118 // and render surface layer lists will be put aside in a temporary list. | 119 // and render surface layer lists will be put aside in a temporary list. |
119 // These values will allow for an efficient reordering of these additions. | 120 // These values will allow for an efficient reordering of these additions. |
120 size_t index_of_first_descendants_addition; | 121 size_t index_of_first_descendants_addition; |
121 size_t num_descendants_added; | 122 size_t num_descendants_added; |
122 size_t index_of_first_render_surface_layer_list_addition; | 123 size_t index_of_first_render_surface_layer_list_addition; |
123 size_t num_render_surfaces_added; | 124 size_t num_render_surfaces_added; |
| 125 |
| 126 // If the layer is part of a [sub]tree that has a touch/wheel event handler, |
| 127 // then the layer is not skipped during CalculateDrawPropertiesInternal, even |
| 128 // if it does not actually have anything to draw (e.g. zero opacity, or empty |
| 129 // content). This flag is used to keep track of such layers. |
| 130 bool skip_drawing; |
124 }; | 131 }; |
125 | 132 |
126 } // namespace cc | 133 } // namespace cc |
127 | 134 |
128 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ | 135 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ |
OLD | NEW |