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 #include "cc/layers/layer_iterator.h" | 5 #include "cc/layers/layer_iterator.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
10 #include "cc/trees/layer_tree_host_common.h" | 10 #include "cc/trees/layer_tree_host_common.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 root_layer->CreateRenderSurface(); | 134 root_layer->CreateRenderSurface(); |
135 | 135 |
136 root_layer->AddChild(first); | 136 root_layer->AddChild(first); |
137 root_layer->AddChild(second); | 137 root_layer->AddChild(second); |
138 root_layer->AddChild(third); | 138 root_layer->AddChild(third); |
139 root_layer->AddChild(fourth); | 139 root_layer->AddChild(fourth); |
140 | 140 |
141 LayerList render_surface_layerList; | 141 LayerList render_surface_layerList; |
142 LayerTreeHostCommon::CalculateDrawProperties(root_layer.get(), | 142 LayerTreeHostCommon::CalculateDrawProperties(root_layer.get(), |
143 root_layer->bounds(), | 143 root_layer->bounds(), |
| 144 gfx::Transform(), |
144 1.f, | 145 1.f, |
145 1.f, | 146 1.f, |
146 NULL, | 147 NULL, |
147 256, | 148 256, |
148 false, | 149 false, |
149 false, | 150 false, |
150 &render_surface_layerList); | 151 &render_surface_layerList); |
151 | 152 |
152 IterateBackToFront(&render_surface_layerList); | 153 IterateBackToFront(&render_surface_layerList); |
153 EXPECT_COUNT(root_layer, 0, -1, 1); | 154 EXPECT_COUNT(root_layer, 0, -1, 1); |
(...skipping 28 matching lines...) Expand all Loading... |
182 root_layer->AddChild(root3); | 183 root_layer->AddChild(root3); |
183 root2->AddChild(root21); | 184 root2->AddChild(root21); |
184 root2->AddChild(root22); | 185 root2->AddChild(root22); |
185 root2->AddChild(root23); | 186 root2->AddChild(root23); |
186 root22->AddChild(root221); | 187 root22->AddChild(root221); |
187 root23->AddChild(root231); | 188 root23->AddChild(root231); |
188 | 189 |
189 LayerList render_surface_layerList; | 190 LayerList render_surface_layerList; |
190 LayerTreeHostCommon::CalculateDrawProperties(root_layer.get(), | 191 LayerTreeHostCommon::CalculateDrawProperties(root_layer.get(), |
191 root_layer->bounds(), | 192 root_layer->bounds(), |
| 193 gfx::Transform(), |
192 1.f, | 194 1.f, |
193 1.f, | 195 1.f, |
194 NULL, | 196 NULL, |
195 256, | 197 256, |
196 false, | 198 false, |
197 false, | 199 false, |
198 &render_surface_layerList); | 200 &render_surface_layerList); |
199 | 201 |
200 IterateBackToFront(&render_surface_layerList); | 202 IterateBackToFront(&render_surface_layerList); |
201 EXPECT_COUNT(root_layer, 0, -1, 1); | 203 EXPECT_COUNT(root_layer, 0, -1, 1); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 root2->AddChild(root22); | 247 root2->AddChild(root22); |
246 root2->AddChild(root23); | 248 root2->AddChild(root23); |
247 root22->SetOpacity(0.5f); | 249 root22->SetOpacity(0.5f); |
248 root22->AddChild(root221); | 250 root22->AddChild(root221); |
249 root23->SetOpacity(0.5f); | 251 root23->SetOpacity(0.5f); |
250 root23->AddChild(root231); | 252 root23->AddChild(root231); |
251 | 253 |
252 LayerList render_surface_layerList; | 254 LayerList render_surface_layerList; |
253 LayerTreeHostCommon::CalculateDrawProperties(root_layer.get(), | 255 LayerTreeHostCommon::CalculateDrawProperties(root_layer.get(), |
254 root_layer->bounds(), | 256 root_layer->bounds(), |
| 257 gfx::Transform(), |
255 1.f, | 258 1.f, |
256 1.f, | 259 1.f, |
257 NULL, | 260 NULL, |
258 256, | 261 256, |
259 false, | 262 false, |
260 false, | 263 false, |
261 &render_surface_layerList); | 264 &render_surface_layerList); |
262 | 265 |
263 IterateBackToFront(&render_surface_layerList); | 266 IterateBackToFront(&render_surface_layerList); |
264 EXPECT_COUNT(root_layer, 0, -1, 1); | 267 EXPECT_COUNT(root_layer, 0, -1, 1); |
(...skipping 13 matching lines...) Expand all Loading... |
278 EXPECT_COUNT(root21, -1, -1, 9); | 281 EXPECT_COUNT(root21, -1, -1, 9); |
279 EXPECT_COUNT(root22, 7, 8, 6); | 282 EXPECT_COUNT(root22, 7, 8, 6); |
280 EXPECT_COUNT(root221, -1, -1, 5); | 283 EXPECT_COUNT(root221, -1, -1, 5); |
281 EXPECT_COUNT(root23, 3, 4, 2); | 284 EXPECT_COUNT(root23, 3, 4, 2); |
282 EXPECT_COUNT(root231, -1, -1, 1); | 285 EXPECT_COUNT(root231, -1, -1, 1); |
283 EXPECT_COUNT(root3, -1, -1, 0); | 286 EXPECT_COUNT(root3, -1, -1, 0); |
284 } | 287 } |
285 | 288 |
286 } // namespace | 289 } // namespace |
287 } // namespace cc | 290 } // namespace cc |
OLD | NEW |