OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TREES_DRAW_PROPERTY_UTILS_H_ | 5 #ifndef CC_TREES_DRAW_PROPERTY_UTILS_H_ |
6 #define CC_TREES_DRAW_PROPERTY_UTILS_H_ | 6 #define CC_TREES_DRAW_PROPERTY_UTILS_H_ |
7 | 7 |
8 #include "cc/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
| 9 #include "cc/layers/draw_properties.h" |
9 #include "cc/layers/layer_lists.h" | 10 #include "cc/layers/layer_lists.h" |
10 | 11 |
11 namespace gfx { | 12 namespace gfx { |
12 class Rect; | 13 class Rect; |
13 class Transform; | 14 class Transform; |
14 } // namespace gfx | 15 } // namespace gfx |
15 | 16 |
16 namespace cc { | 17 namespace cc { |
17 | 18 |
18 class ClipTree; | 19 class ClipTree; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 void CC_EXPORT | 68 void CC_EXPORT |
68 ComputeVisibleRectsUsingPropertyTrees(Layer* root_layer, | 69 ComputeVisibleRectsUsingPropertyTrees(Layer* root_layer, |
69 PropertyTrees* property_trees, | 70 PropertyTrees* property_trees, |
70 LayerList* update_layer_list); | 71 LayerList* update_layer_list); |
71 | 72 |
72 void CC_EXPORT | 73 void CC_EXPORT |
73 ComputeVisibleRectsUsingPropertyTrees(LayerImpl* root_layer, | 74 ComputeVisibleRectsUsingPropertyTrees(LayerImpl* root_layer, |
74 PropertyTrees* property_trees, | 75 PropertyTrees* property_trees, |
75 LayerImplList* update_layer_list); | 76 LayerImplList* update_layer_list); |
76 | 77 |
| 78 void CC_EXPORT ComputeLayerDrawPropertiesUsingPropertyTrees( |
| 79 const LayerImpl* layer, |
| 80 const PropertyTrees* property_trees, |
| 81 bool layers_always_allowed_lcd_text, |
| 82 bool can_use_lcd_text, |
| 83 DrawProperties<LayerImpl>* draw_properties); |
| 84 |
| 85 struct CC_EXPORT SurfaceDrawProperties { |
| 86 SurfaceDrawProperties(); |
| 87 ~SurfaceDrawProperties(); |
| 88 |
| 89 bool is_clipped; |
| 90 float draw_opacity; |
| 91 gfx::Transform draw_transform; |
| 92 gfx::Transform screen_space_transform; |
| 93 gfx::Transform replica_draw_transform; |
| 94 gfx::Transform replica_screen_space_transform; |
| 95 gfx::Rect clip_rect; |
| 96 }; |
| 97 |
| 98 void CC_EXPORT ComputeSurfaceDrawPropertiesUsingPropertyTrees( |
| 99 RenderSurfaceImpl* render_surface, |
| 100 const PropertyTrees* property_trees, |
| 101 SurfaceDrawProperties* draw_properties); |
| 102 |
77 gfx::Transform CC_EXPORT | 103 gfx::Transform CC_EXPORT |
78 DrawTransformFromPropertyTrees(const Layer* layer, const TransformTree& tree); | 104 DrawTransformFromPropertyTrees(const Layer* layer, const TransformTree& tree); |
79 | 105 |
80 gfx::Transform CC_EXPORT DrawTransformOfRenderSurfaceFromPropertyTrees( | |
81 const RenderSurfaceImpl* render_Surface, | |
82 const TransformTree& tree); | |
83 | |
84 bool CC_EXPORT | |
85 RenderSurfaceIsClippedFromPropertyTrees(const RenderSurfaceImpl* render_surface, | |
86 const ClipTree& tree); | |
87 | |
88 gfx::Rect CC_EXPORT ClipRectOfRenderSurfaceFromPropertyTrees( | |
89 const RenderSurfaceImpl* render_surface, | |
90 const ClipTree& clip_tree); | |
91 | |
92 gfx::Transform CC_EXPORT ScreenSpaceTransformOfRenderSurfaceFromPropertyTrees( | |
93 const RenderSurfaceImpl* render_surface, | |
94 const TransformTree& tree); | |
95 | |
96 gfx::Transform CC_EXPORT | 106 gfx::Transform CC_EXPORT |
97 DrawTransformFromPropertyTrees(const LayerImpl* layer, | 107 DrawTransformFromPropertyTrees(const LayerImpl* layer, |
98 const TransformTree& tree); | 108 const TransformTree& tree); |
99 | 109 |
100 gfx::Transform CC_EXPORT | 110 gfx::Transform CC_EXPORT |
101 ScreenSpaceTransformFromPropertyTrees(const Layer* layer, | 111 ScreenSpaceTransformFromPropertyTrees(const Layer* layer, |
102 const TransformTree& tree); | 112 const TransformTree& tree); |
103 | 113 |
104 gfx::Transform CC_EXPORT | 114 gfx::Transform CC_EXPORT |
105 ScreenSpaceTransformFromPropertyTrees(const LayerImpl* layer, | 115 ScreenSpaceTransformFromPropertyTrees(const LayerImpl* layer, |
106 const TransformTree& tree); | 116 const TransformTree& tree); |
107 | 117 |
108 bool CC_EXPORT | |
109 ScreenSpaceTransformIsAnimatingFromPropertyTrees(const Layer* layer, | |
110 const TransformTree& tree); | |
111 | |
112 bool CC_EXPORT | |
113 ScreenSpaceTransformIsAnimatingFromPropertyTrees(const LayerImpl* layer, | |
114 const TransformTree& tree); | |
115 | |
116 float CC_EXPORT | |
117 MaximumAnimationTargetScaleFromPropertyTrees(const LayerImpl* layer, | |
118 const TransformTree& tree); | |
119 | |
120 float CC_EXPORT | |
121 StartingAnimationScaleFromPropertyTrees(const LayerImpl* layer, | |
122 const TransformTree& tree); | |
123 | |
124 float CC_EXPORT DrawOpacityFromPropertyTrees(const Layer* layer, | |
125 const EffectTree& tree); | |
126 | |
127 float CC_EXPORT DrawOpacityFromPropertyTrees(const LayerImpl* layer, | |
128 const EffectTree& tree); | |
129 | |
130 float CC_EXPORT | |
131 DrawOpacityOfRenderSurfaceFromPropertyTrees(RenderSurfaceImpl* render_surface, | |
132 const EffectTree& tree); | |
133 | |
134 bool CC_EXPORT | |
135 CanUseLcdTextFromPropertyTrees(const LayerImpl* layer, | |
136 bool layers_always_allowed_lcd_text, | |
137 bool can_use_lcd_text, | |
138 PropertyTrees* property_trees); | |
139 | |
140 gfx::Rect CC_EXPORT DrawableContentRectOfSurfaceFromPropertyTrees( | |
141 const RenderSurfaceImpl* render_surface, | |
142 const TransformTree& transform_tree); | |
143 | |
144 gfx::Rect CC_EXPORT | 118 gfx::Rect CC_EXPORT |
145 DrawableContentRectFromPropertyTrees(const LayerImpl* layer, | 119 DrawableContentRectOfSurface(const RenderSurfaceImpl* render_surface); |
146 const TransformTree& transform_tree); | |
147 | |
148 gfx::Rect CC_EXPORT | |
149 ClipRectFromPropertyTrees(const LayerImpl* layer, | |
150 const TransformTree& transform_tree); | |
151 | 120 |
152 gfx::Rect CC_EXPORT ViewportRectFromPropertyTrees(const ClipTree& tree); | 121 gfx::Rect CC_EXPORT ViewportRectFromPropertyTrees(const ClipTree& tree); |
153 | 122 |
154 gfx::Transform CC_EXPORT DrawTransformOfRenderSurfaceReplicaFromPropertyTrees( | |
155 const RenderSurfaceImpl* render_surface, | |
156 const TransformTree& tree); | |
157 | |
158 gfx::Transform CC_EXPORT | |
159 ScreenSpaceTransformOfRenderSurfaceReplicaFromPropertyTrees( | |
160 const RenderSurfaceImpl* render_surface, | |
161 const TransformTree& tree); | |
162 | |
163 } // namespace cc | 123 } // namespace cc |
164 | 124 |
165 #endif // CC_TREES_DRAW_PROPERTY_UTILS_H_ | 125 #endif // CC_TREES_DRAW_PROPERTY_UTILS_H_ |
OLD | NEW |