| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1429 ASSERT_EQ(1U, render_pass->quad_list.size()); | 1429 ASSERT_EQ(1U, render_pass->quad_list.size()); |
| 1430 EXPECT_EQ(DrawQuad::PICTURE_CONTENT, | 1430 EXPECT_EQ(DrawQuad::PICTURE_CONTENT, |
| 1431 render_pass->quad_list.front()->material); | 1431 render_pass->quad_list.front()->material); |
| 1432 } | 1432 } |
| 1433 | 1433 |
| 1434 TEST_F(PictureLayerImplTest, SolidColorLayerHasVisibleFullCoverage) { | 1434 TEST_F(PictureLayerImplTest, SolidColorLayerHasVisibleFullCoverage) { |
| 1435 scoped_ptr<RenderPass> render_pass = RenderPass::Create(); | 1435 scoped_ptr<RenderPass> render_pass = RenderPass::Create(); |
| 1436 | 1436 |
| 1437 gfx::Size tile_size(1000, 1000); | 1437 gfx::Size tile_size(1000, 1000); |
| 1438 gfx::Size layer_bounds(1500, 1500); | 1438 gfx::Size layer_bounds(1500, 1500); |
| 1439 gfx::Rect visible_rect(1000, 1000); | 1439 gfx::Rect visible_rect(250, 250, 1000, 1000); |
| 1440 | 1440 |
| 1441 scoped_refptr<FakePicturePileImpl> pending_pile = | 1441 scoped_refptr<FakePicturePileImpl> pending_pile = |
| 1442 FakePicturePileImpl::CreateEmptyPile(tile_size, layer_bounds); | 1442 FakePicturePileImpl::CreateEmptyPile(tile_size, layer_bounds); |
| 1443 scoped_refptr<FakePicturePileImpl> active_pile = | 1443 scoped_refptr<FakePicturePileImpl> active_pile = |
| 1444 FakePicturePileImpl::CreateEmptyPile(tile_size, layer_bounds); | 1444 FakePicturePileImpl::CreateEmptyPile(tile_size, layer_bounds); |
| 1445 | 1445 |
| 1446 pending_pile->set_is_solid_color(true); | 1446 pending_pile->set_is_solid_color(true); |
| 1447 active_pile->set_is_solid_color(true); | 1447 active_pile->set_is_solid_color(true); |
| 1448 | 1448 |
| 1449 SetupTrees(pending_pile, active_pile); | 1449 SetupTrees(pending_pile, active_pile); |
| (...skipping 3197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4647 result = layer->CalculateTileSize(gfx::Size(447, 400)); | 4647 result = layer->CalculateTileSize(gfx::Size(447, 400)); |
| 4648 EXPECT_EQ(result.width(), 448); | 4648 EXPECT_EQ(result.width(), 448); |
| 4649 EXPECT_EQ(result.height(), 448); | 4649 EXPECT_EQ(result.height(), 448); |
| 4650 result = layer->CalculateTileSize(gfx::Size(500, 499)); | 4650 result = layer->CalculateTileSize(gfx::Size(500, 499)); |
| 4651 EXPECT_EQ(result.width(), 512); | 4651 EXPECT_EQ(result.width(), 512); |
| 4652 EXPECT_EQ(result.height(), 500 + 2); | 4652 EXPECT_EQ(result.height(), 500 + 2); |
| 4653 } | 4653 } |
| 4654 | 4654 |
| 4655 } // namespace | 4655 } // namespace |
| 4656 } // namespace cc | 4656 } // namespace cc |
| OLD | NEW |