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 "cc/trees/occlusion.h" | 9 #include "cc/trees/occlusion.h" |
10 #include "third_party/skia/include/core/SkXfermode.h" | 10 #include "third_party/skia/include/core/SkXfermode.h" |
11 #include "ui/gfx/geometry/rect.h" | 11 #include "ui/gfx/geometry/rect.h" |
12 #include "ui/gfx/transform.h" | 12 #include "ui/gfx/transform.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 | 15 |
16 // Container for properties that layers need to compute before they can be | 16 // Container for properties that layers need to compute before they can be |
17 // drawn. | 17 // drawn. |
18 template <typename LayerType> | 18 template <typename LayerType> |
19 struct CC_EXPORT DrawProperties { | 19 struct CC_EXPORT DrawProperties { |
20 DrawProperties() | 20 DrawProperties() |
21 : opacity(0.f), | 21 : opacity(0.f), |
22 blend_mode(SkXfermode::kSrcOver_Mode), | 22 blend_mode(SkXfermode::kSrcOver_Mode), |
23 opacity_is_animating(false), | 23 opacity_is_animating(false), |
24 screen_space_opacity_is_animating(false), | 24 screen_space_opacity_is_animating(false), |
25 target_space_transform_is_animating(false), | 25 target_space_transform_is_animating(false), |
26 screen_space_transform_is_animating(false), | 26 screen_space_transform_is_animating(false), |
27 can_use_lcd_text(false), | 27 can_use_lcd_text(false), |
28 is_clipped(false), | 28 is_clipped(false), |
29 is_clipped_from_property_trees(false), | |
29 render_target(nullptr), | 30 render_target(nullptr), |
30 num_unclipped_descendants(0), | 31 num_unclipped_descendants(0), |
31 layer_or_descendant_has_copy_request(false), | 32 layer_or_descendant_has_copy_request(false), |
32 layer_or_descendant_has_input_handler(false), | 33 layer_or_descendant_has_input_handler(false), |
33 has_child_with_a_scroll_parent(false), | 34 has_child_with_a_scroll_parent(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), |
(...skipping 27 matching lines...) Expand all Loading... | |
66 bool opacity_is_animating; | 67 bool opacity_is_animating; |
67 bool screen_space_opacity_is_animating; | 68 bool screen_space_opacity_is_animating; |
68 bool target_space_transform_is_animating; | 69 bool target_space_transform_is_animating; |
69 bool screen_space_transform_is_animating; | 70 bool screen_space_transform_is_animating; |
70 | 71 |
71 // True if the layer can use LCD text. | 72 // True if the layer can use LCD text. |
72 bool can_use_lcd_text; | 73 bool can_use_lcd_text; |
73 | 74 |
74 // True if the layer needs to be clipped by clip_rect. | 75 // True if the layer needs to be clipped by clip_rect. |
75 bool is_clipped; | 76 bool is_clipped; |
77 bool is_clipped_from_property_trees; | |
ajuma
2015/07/07 17:58:48
So far I think we've been adding 'from_property_tr
enne (OOO)
2015/07/07 18:25:48
This is a bit odd to have both at this point in ti
jaydasika
2015/07/07 18:35:28
moved it from draw_properties to Layer/LayerImpl.
| |
76 | 78 |
77 // The layer whose coordinate space this layer draws into. This can be | 79 // The layer whose coordinate space this layer draws into. This can be |
78 // either the same layer (draw_properties_.render_target == this) or an | 80 // either the same layer (draw_properties_.render_target == this) or an |
79 // ancestor of this layer. | 81 // ancestor of this layer. |
80 LayerType* render_target; | 82 LayerType* render_target; |
81 | 83 |
82 // This rect is a bounding box around what part of the layer is visible, in | 84 // This rect is a bounding box around what part of the layer is visible, in |
83 // the layer's coordinate space. | 85 // the layer's coordinate space. |
84 gfx::Rect visible_layer_rect; | 86 gfx::Rect visible_layer_rect; |
85 | 87 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
134 float maximum_animation_contents_scale; | 136 float maximum_animation_contents_scale; |
135 | 137 |
136 // The scale during the layer animation start at which content should be | 138 // The scale during the layer animation start at which content should be |
137 // rastered at to be crisp. | 139 // rastered at to be crisp. |
138 float starting_animation_contents_scale; | 140 float starting_animation_contents_scale; |
139 }; | 141 }; |
140 | 142 |
141 } // namespace cc | 143 } // namespace cc |
142 | 144 |
143 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ | 145 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ |
OLD | NEW |