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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "cc/trees/occlusion.h" | 11 #include "cc/trees/occlusion.h" |
12 #include "third_party/skia/include/core/SkXfermode.h" | 12 #include "third_party/skia/include/core/SkXfermode.h" |
13 #include "ui/gfx/geometry/rect.h" | 13 #include "ui/gfx/geometry/rect.h" |
14 #include "ui/gfx/transform.h" | 14 #include "ui/gfx/transform.h" |
15 | 15 |
16 namespace cc { | 16 namespace cc { |
17 class LayerImpl; | 17 class RenderSurfaceImpl; |
18 | 18 |
19 // Container for properties that layers need to compute before they can be | 19 // Container for properties that layers need to compute before they can be |
20 // drawn. | 20 // drawn. |
21 struct CC_EXPORT DrawProperties { | 21 struct CC_EXPORT DrawProperties { |
22 DrawProperties(); | 22 DrawProperties(); |
23 ~DrawProperties(); | 23 ~DrawProperties(); |
24 | 24 |
25 // Transforms objects from content space to target surface space, where | 25 // Transforms objects from content space to target surface space, where |
26 // this layer would be drawn. | 26 // this layer would be drawn. |
27 gfx::Transform target_space_transform; | 27 gfx::Transform target_space_transform; |
(...skipping 14 matching lines...) Expand all Loading... |
42 // animating, the main thread may not have the same values that are used | 42 // animating, the main thread may not have the same values that are used |
43 // to draw. | 43 // to draw. |
44 bool screen_space_transform_is_animating; | 44 bool screen_space_transform_is_animating; |
45 | 45 |
46 // True if the layer can use LCD text. | 46 // True if the layer can use LCD text. |
47 bool can_use_lcd_text; | 47 bool can_use_lcd_text; |
48 | 48 |
49 // True if the layer needs to be clipped by clip_rect. | 49 // True if the layer needs to be clipped by clip_rect. |
50 bool is_clipped; | 50 bool is_clipped; |
51 | 51 |
52 // The layer whose coordinate space this layer draws into. This can be | |
53 // either the same layer (draw_properties_.render_target == this) or an | |
54 // ancestor of this layer. | |
55 LayerImpl* render_target; | |
56 | |
57 // This rect is a bounding box around what part of the layer is visible, in | 52 // This rect is a bounding box around what part of the layer is visible, in |
58 // the layer's coordinate space. | 53 // the layer's coordinate space. |
59 gfx::Rect visible_layer_rect; | 54 gfx::Rect visible_layer_rect; |
60 | 55 |
61 // In target surface space, the rect that encloses the clipped, drawable | 56 // In target surface space, the rect that encloses the clipped, drawable |
62 // content of the layer. | 57 // content of the layer. |
63 gfx::Rect drawable_content_rect; | 58 gfx::Rect drawable_content_rect; |
64 | 59 |
65 // In target surface space, the original rect that clipped this layer. This | 60 // In target surface space, the original rect that clipped this layer. This |
66 // value is used to avoid unnecessarily changing GL scissor state. | 61 // value is used to avoid unnecessarily changing GL scissor state. |
(...skipping 17 matching lines...) Expand all Loading... |
84 float maximum_animation_contents_scale; | 79 float maximum_animation_contents_scale; |
85 | 80 |
86 // The scale during the layer animation start at which content should be | 81 // The scale during the layer animation start at which content should be |
87 // rastered at to be crisp. | 82 // rastered at to be crisp. |
88 float starting_animation_contents_scale; | 83 float starting_animation_contents_scale; |
89 }; | 84 }; |
90 | 85 |
91 } // namespace cc | 86 } // namespace cc |
92 | 87 |
93 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ | 88 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ |
OLD | NEW |