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* draw_properties); | |
84 | |
85 struct CC_EXPORT SurfaceDrawProperties { | |
enne (OOO)
2015/09/02 21:51:35
It's a bit odd to have this here and DrawPropertie
ajuma
2015/09/03 15:06:49
Moved to its own file.
| |
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 LayerImpl* layer, | |
125 const EffectTree& tree); | |
126 | |
127 float CC_EXPORT | |
128 DrawOpacityOfRenderSurfaceFromPropertyTrees(RenderSurfaceImpl* render_surface, | |
129 const EffectTree& tree); | |
130 | |
131 bool CC_EXPORT | |
132 CanUseLcdTextFromPropertyTrees(const LayerImpl* layer, | |
133 bool layers_always_allowed_lcd_text, | |
134 bool can_use_lcd_text, | |
135 PropertyTrees* property_trees); | |
136 | |
137 gfx::Rect CC_EXPORT DrawableContentRectOfSurfaceFromPropertyTrees( | |
138 const RenderSurfaceImpl* render_surface, | |
139 const TransformTree& transform_tree); | |
140 | |
141 gfx::Rect CC_EXPORT | |
142 DrawableContentRectFromPropertyTrees(const LayerImpl* layer, | |
143 const TransformTree& transform_tree); | |
144 | |
145 gfx::Rect CC_EXPORT | |
146 ClipRectFromPropertyTrees(const LayerImpl* layer, | |
147 const TransformTree& transform_tree); | |
148 | |
149 gfx::Transform CC_EXPORT DrawTransformOfRenderSurfaceReplicaFromPropertyTrees( | |
150 const RenderSurfaceImpl* render_surface, | |
151 const TransformTree& tree); | |
152 | |
153 gfx::Transform CC_EXPORT | |
154 ScreenSpaceTransformOfRenderSurfaceReplicaFromPropertyTrees( | |
155 const RenderSurfaceImpl* render_surface, | |
156 const TransformTree& tree); | |
157 | |
158 } // namespace cc | 118 } // namespace cc |
159 | 119 |
160 #endif // CC_TREES_DRAW_PROPERTY_UTILS_H_ | 120 #endif // CC_TREES_DRAW_PROPERTY_UTILS_H_ |
OLD | NEW |