| 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/resources/tile.h" | 5 #include "cc/resources/tile.h" |
| 6 #include "cc/resources/tile_priority.h" | 6 #include "cc/resources/tile_priority.h" |
| 7 #include "cc/test/fake_output_surface.h" | 7 #include "cc/test/fake_output_surface.h" |
| 8 #include "cc/test/fake_output_surface_client.h" | 8 #include "cc/test/fake_output_surface_client.h" |
| 9 #include "cc/test/fake_picture_pile_impl.h" | 9 #include "cc/test/fake_picture_pile_impl.h" |
| 10 #include "cc/test/fake_tile_manager.h" | 10 #include "cc/test/fake_tile_manager.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 gfx::Size tile_size) { | 79 gfx::Size tile_size) { |
| 80 TileVector tiles; | 80 TileVector tiles; |
| 81 for (int i = 0; i < count; ++i) { | 81 for (int i = 0; i < count; ++i) { |
| 82 scoped_refptr<Tile> tile = tile_manager_->CreateTile(picture_pile_.get(), | 82 scoped_refptr<Tile> tile = tile_manager_->CreateTile(picture_pile_.get(), |
| 83 tile_size, | 83 tile_size, |
| 84 gfx::Rect(), | 84 gfx::Rect(), |
| 85 gfx::Rect(), | 85 gfx::Rect(), |
| 86 1.0, | 86 1.0, |
| 87 0, | 87 0, |
| 88 0, | 88 0, |
| 89 true); | 89 true, |
| 90 false); |
| 90 tile->SetPriority(ACTIVE_TREE, active_priority); | 91 tile->SetPriority(ACTIVE_TREE, active_priority); |
| 91 tile->SetPriority(PENDING_TREE, pending_priority); | 92 tile->SetPriority(PENDING_TREE, pending_priority); |
| 92 tiles.push_back(tile); | 93 tiles.push_back(tile); |
| 93 } | 94 } |
| 94 return tiles; | 95 return tiles; |
| 95 } | 96 } |
| 96 | 97 |
| 97 TileVector CreateTiles(int count, | 98 TileVector CreateTiles(int count, |
| 98 TilePriority active_priority, | 99 TilePriority active_priority, |
| 99 TilePriority pending_priority) { | 100 TilePriority pending_priority) { |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 } | 522 } |
| 522 | 523 |
| 523 // If true, the max tile limit should be applied as bytes; if false, | 524 // If true, the max tile limit should be applied as bytes; if false, |
| 524 // as num_resources_limit. | 525 // as num_resources_limit. |
| 525 INSTANTIATE_TEST_CASE_P(TileManagerTests, | 526 INSTANTIATE_TEST_CASE_P(TileManagerTests, |
| 526 TileManagerTest, | 527 TileManagerTest, |
| 527 ::testing::Values(true, false)); | 528 ::testing::Values(true, false)); |
| 528 | 529 |
| 529 } // namespace | 530 } // namespace |
| 530 } // namespace cc | 531 } // namespace cc |
| OLD | NEW |