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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 virtual void TearDown() OVERRIDE { | 69 virtual void TearDown() OVERRIDE { |
70 tile_manager_.reset(NULL); | 70 tile_manager_.reset(NULL); |
71 picture_pile_ = NULL; | 71 picture_pile_ = NULL; |
72 | 72 |
73 testing::Test::TearDown(); | 73 testing::Test::TearDown(); |
74 } | 74 } |
75 | 75 |
76 TileVector CreateTilesWithSize(int count, | 76 TileVector CreateTilesWithSize(int count, |
77 TilePriority active_priority, | 77 TilePriority active_priority, |
78 TilePriority pending_priority, | 78 TilePriority pending_priority, |
79 gfx::Size tile_size) { | 79 const 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 Tile::USE_LCD_TEXT); | 89 Tile::USE_LCD_TEXT); |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 } | 512 } |
513 | 513 |
514 // If true, the max tile limit should be applied as bytes; if false, | 514 // If true, the max tile limit should be applied as bytes; if false, |
515 // as num_resources_limit. | 515 // as num_resources_limit. |
516 INSTANTIATE_TEST_CASE_P(TileManagerTests, | 516 INSTANTIATE_TEST_CASE_P(TileManagerTests, |
517 TileManagerTest, | 517 TileManagerTest, |
518 ::testing::Values(true, false)); | 518 ::testing::Values(true, false)); |
519 | 519 |
520 } // namespace | 520 } // namespace |
521 } // namespace cc | 521 } // namespace cc |
OLD | NEW |