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 13 matching lines...) Expand all Loading... | |
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 has_child_with_a_scroll_parent(false), | 32 has_child_with_a_scroll_parent(false), |
33 sorted_for_recursion(false), | 33 sorted_for_recursion(false), |
34 is_in_layer_list(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 | 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). |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 // This is true if the layer has any direct child that has a scroll parent. | 105 // This is true if the layer has any direct child that has a scroll parent. |
105 // This layer will not be the scroll parent in this case. This information | 106 // This layer will not be the scroll parent in this case. This information |
106 // lets us avoid work in CalculateDrawPropertiesInternal -- if none of our | 107 // lets us avoid work in CalculateDrawPropertiesInternal -- if none of our |
107 // children have scroll parents, we will not need to recur out of order. | 108 // children have scroll parents, we will not need to recur out of order. |
108 bool has_child_with_a_scroll_parent; | 109 bool has_child_with_a_scroll_parent; |
109 | 110 |
110 // This is true if the order (wrt to its siblings in the tree) in which the | 111 // This is true if the order (wrt to its siblings in the tree) in which the |
111 // layer will be visited while computing draw properties has been determined. | 112 // layer will be visited while computing draw properties has been determined. |
112 bool sorted_for_recursion; | 113 bool sorted_for_recursion; |
113 | 114 |
115 // This returns true if the layer has been included in some surface's layer | |
116 // list (i.e., this thing will draw). | |
117 bool is_in_layer_list; | |
enne (OOO)
2014/05/06 20:30:58
vmpstr is doing something like this as well in htt
Ian Vollick
2014/05/06 21:06:20
As we discussed offline, this is subsumed by vmpst
| |
118 | |
114 // If this layer is visited out of order, its contribution to the descendant | 119 // If this layer is visited out of order, its contribution to the descendant |
115 // and render surface layer lists will be put aside in a temporary list. | 120 // and render surface layer lists will be put aside in a temporary list. |
116 // These values will allow for an efficient reordering of these additions. | 121 // These values will allow for an efficient reordering of these additions. |
117 size_t index_of_first_descendants_addition; | 122 size_t index_of_first_descendants_addition; |
118 size_t num_descendants_added; | 123 size_t num_descendants_added; |
119 size_t index_of_first_render_surface_layer_list_addition; | 124 size_t index_of_first_render_surface_layer_list_addition; |
120 size_t num_render_surfaces_added; | 125 size_t num_render_surfaces_added; |
121 }; | 126 }; |
122 | 127 |
123 } // namespace cc | 128 } // namespace cc |
124 | 129 |
125 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ | 130 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ |
OLD | NEW |