Chromium Code Reviews| 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 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 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 last_drawn_render_surface_layer_list_id(0) {} | 38 last_drawn_render_surface_layer_list_id(0), |
| 39 ideal_contents_scale(1.f), | |
|
danakj
2014/06/11 19:48:35
can you init these all to 0, so we don't hide this
sohanjg
2014/06/12 11:48:24
Done.
| |
| 40 maximum_animation_contents_scale(1.f), | |
| 41 page_scale_factor(1.f), | |
| 42 device_scale_factor(1.f) {} | |
| 39 | 43 |
| 40 // Transforms objects from content space to target surface space, where | 44 // Transforms objects from content space to target surface space, where |
| 41 // this layer would be drawn. | 45 // this layer would be drawn. |
| 42 gfx::Transform target_space_transform; | 46 gfx::Transform target_space_transform; |
| 43 | 47 |
| 44 // Transforms objects from content space to screen space (viewport space). | 48 // Transforms objects from content space to screen space (viewport space). |
| 45 gfx::Transform screen_space_transform; | 49 gfx::Transform screen_space_transform; |
| 46 | 50 |
| 47 // DrawProperties::opacity may be different than LayerType::opacity, | 51 // DrawProperties::opacity may be different than LayerType::opacity, |
| 48 // particularly in the case when a RenderSurface re-parents the layer's | 52 // particularly in the case when a RenderSurface re-parents the layer's |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 size_t num_render_surfaces_added; | 125 size_t num_render_surfaces_added; |
| 122 | 126 |
| 123 // Each time we generate a new render surface layer list, an ID is used to | 127 // Each time we generate a new render surface layer list, an ID is used to |
| 124 // identify it. |last_drawn_render_surface_layer_list_id| is set to the ID | 128 // identify it. |last_drawn_render_surface_layer_list_id| is set to the ID |
| 125 // that marked the render surface layer list generation which last updated | 129 // that marked the render surface layer list generation which last updated |
| 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; |
| 135 | |
| 136 // The scale at which content for the layer should be rastered in order to be | |
| 137 // perfectly crisp. | |
| 138 float ideal_contents_scale; | |
| 139 | |
| 140 // The maximum scale during the layers current animation at which content | |
| 141 // should be rastered at to be crisp. | |
| 142 float maximum_animation_contents_scale; | |
| 143 | |
| 144 // The page scale factor that is applied to the layer. Since some layers may | |
| 145 // have page scale applied and others not, this may differ between layers. | |
| 146 float page_scale_factor; | |
| 147 | |
| 148 // The device scale factor that is applied to the layer. | |
| 149 float device_scale_factor; | |
| 131 }; | 150 }; |
| 132 | 151 |
| 133 } // namespace cc | 152 } // namespace cc |
| 134 | 153 |
| 135 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ | 154 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ |
| OLD | NEW |