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 "base/time/time.h" | 5 #include "base/time/time.h" |
6 #include "cc/resources/tile.h" | 6 #include "cc/resources/tile.h" |
7 #include "cc/resources/tile_priority.h" | 7 #include "cc/resources/tile_priority.h" |
8 #include "cc/test/fake_output_surface.h" | 8 #include "cc/test/fake_output_surface.h" |
9 #include "cc/test/fake_output_surface_client.h" | 9 #include "cc/test/fake_output_surface_client.h" |
10 #include "cc/test/fake_picture_pile_impl.h" | 10 #include "cc/test/fake_picture_pile_impl.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 void CreateBinTiles(int count, ManagedTileBin bin, TileBinVector* tiles) { | 109 void CreateBinTiles(int count, ManagedTileBin bin, TileBinVector* tiles) { |
110 for (int i = 0; i < count; ++i) { | 110 for (int i = 0; i < count; ++i) { |
111 scoped_refptr<Tile> tile = | 111 scoped_refptr<Tile> tile = |
112 tile_manager_->CreateTile(picture_pile_.get(), | 112 tile_manager_->CreateTile(picture_pile_.get(), |
113 settings_.default_tile_size, | 113 settings_.default_tile_size, |
114 gfx::Rect(), | 114 gfx::Rect(), |
115 gfx::Rect(), | 115 gfx::Rect(), |
116 1.0, | 116 1.0, |
117 0, | 117 0, |
118 0, | 118 0, |
119 true); | 119 true, |
| 120 false); |
120 tile->SetPriority(ACTIVE_TREE, GetTilePriorityFromBin(bin)); | 121 tile->SetPriority(ACTIVE_TREE, GetTilePriorityFromBin(bin)); |
121 tile->SetPriority(PENDING_TREE, GetTilePriorityFromBin(bin)); | 122 tile->SetPriority(PENDING_TREE, GetTilePriorityFromBin(bin)); |
122 tiles->push_back(std::make_pair(tile, bin)); | 123 tiles->push_back(std::make_pair(tile, bin)); |
123 } | 124 } |
124 } | 125 } |
125 | 126 |
126 void CreateTiles(int count, TileBinVector* tiles) { | 127 void CreateTiles(int count, TileBinVector* tiles) { |
127 // Roughly an equal amount of all bins. | 128 // Roughly an equal amount of all bins. |
128 int count_per_bin = count / NUM_BINS; | 129 int count_per_bin = count / NUM_BINS; |
129 CreateBinTiles(count_per_bin, NOW_BIN, tiles); | 130 CreateBinTiles(count_per_bin, NOW_BIN, tiles); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 RunManageTilesTest("1000_10", 1000, 10); | 183 RunManageTilesTest("1000_10", 1000, 10); |
183 RunManageTilesTest("10000_10", 10000, 10); | 184 RunManageTilesTest("10000_10", 10000, 10); |
184 RunManageTilesTest("100_100", 100, 100); | 185 RunManageTilesTest("100_100", 100, 100); |
185 RunManageTilesTest("1000_100", 1000, 100); | 186 RunManageTilesTest("1000_100", 1000, 100); |
186 RunManageTilesTest("10000_100", 10000, 100); | 187 RunManageTilesTest("10000_100", 10000, 100); |
187 } | 188 } |
188 | 189 |
189 } // namespace | 190 } // namespace |
190 | 191 |
191 } // namespace cc | 192 } // namespace cc |
OLD | NEW |