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/trees/occlusion_tracker.h" | 5 #include "cc/trees/occlusion_tracker.h" |
6 | 6 |
7 #include "cc/animation/layer_animation_controller.h" | 7 #include "cc/animation/layer_animation_controller.h" |
8 #include "cc/base/math_util.h" | 8 #include "cc/base/math_util.h" |
9 #include "cc/debug/overdraw_metrics.h" | 9 #include "cc/debug/overdraw_metrics.h" |
10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 | 309 |
310 void CalcDrawEtc(TestContentLayerImpl* root) { | 310 void CalcDrawEtc(TestContentLayerImpl* root) { |
311 DCHECK(root == root_.get()); | 311 DCHECK(root == root_.get()); |
312 int dummy_max_texture_size = 512; | 312 int dummy_max_texture_size = 512; |
313 | 313 |
314 DCHECK(!root->render_surface()); | 314 DCHECK(!root->render_surface()); |
315 | 315 |
316 LayerTreeHostCommon::CalculateDrawProperties( | 316 LayerTreeHostCommon::CalculateDrawProperties( |
317 root, | 317 root, |
318 root->bounds(), | 318 root->bounds(), |
| 319 gfx::Transform(), |
319 1.f, | 320 1.f, |
320 1.f, | 321 1.f, |
321 NULL, | 322 NULL, |
322 dummy_max_texture_size, | 323 dummy_max_texture_size, |
323 false, // can_use_lcd_text | 324 false, // can_use_lcd_text |
324 true, // can_adjust_raster_scales | 325 true, // can_adjust_raster_scales |
325 &render_surface_layer_list_impl_); | 326 &render_surface_layer_list_impl_); |
326 | 327 |
327 layer_iterator_ = layer_iterator_begin_ = | 328 layer_iterator_ = layer_iterator_begin_ = |
328 Types::TestLayerIterator::Begin(&render_surface_layer_list_impl_); | 329 Types::TestLayerIterator::Begin(&render_surface_layer_list_impl_); |
329 } | 330 } |
330 | 331 |
331 void CalcDrawEtc(TestContentLayer* root) { | 332 void CalcDrawEtc(TestContentLayer* root) { |
332 DCHECK(root == root_.get()); | 333 DCHECK(root == root_.get()); |
333 int dummy_max_texture_size = 512; | 334 int dummy_max_texture_size = 512; |
334 | 335 |
335 DCHECK(!root->render_surface()); | 336 DCHECK(!root->render_surface()); |
336 | 337 |
337 LayerTreeHostCommon::CalculateDrawProperties( | 338 LayerTreeHostCommon::CalculateDrawProperties( |
338 root, | 339 root, |
339 root->bounds(), | 340 root->bounds(), |
| 341 gfx::Transform(), |
340 1.f, | 342 1.f, |
341 1.f, | 343 1.f, |
342 NULL, | 344 NULL, |
343 dummy_max_texture_size, | 345 dummy_max_texture_size, |
344 false, // can_use_lcd_text | 346 false, // can_use_lcd_text |
345 true, // can_adjust_raster_scales | 347 true, // can_adjust_raster_scales |
346 &render_surface_layer_list_); | 348 &render_surface_layer_list_); |
347 | 349 |
348 layer_iterator_ = layer_iterator_begin_ = | 350 layer_iterator_ = layer_iterator_begin_ = |
349 Types::TestLayerIterator::Begin(&render_surface_layer_list_); | 351 Types::TestLayerIterator::Begin(&render_surface_layer_list_); |
(...skipping 4459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4809 occlusion.occlusion_from_outside_target().ToString()); | 4811 occlusion.occlusion_from_outside_target().ToString()); |
4810 EXPECT_EQ(gfx::Rect(10, 10, 50, 50).ToString(), | 4812 EXPECT_EQ(gfx::Rect(10, 10, 50, 50).ToString(), |
4811 occlusion.occlusion_from_inside_target().ToString()); | 4813 occlusion.occlusion_from_inside_target().ToString()); |
4812 } | 4814 } |
4813 }; | 4815 }; |
4814 | 4816 |
4815 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestScaledLayerInSurfaceIsClipped) | 4817 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestScaledLayerInSurfaceIsClipped) |
4816 | 4818 |
4817 } // namespace | 4819 } // namespace |
4818 } // namespace cc | 4820 } // namespace cc |
OLD | NEW |