Chromium Code Reviews| Index: cc/layers/picture_layer_impl_unittest.cc |
| diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc |
| index bb61f4e4deae11b9a0dcdd9f649f0082bfe4608a..45180f3a61d72cd442126578020bd9cc5886ee71 100644 |
| --- a/cc/layers/picture_layer_impl_unittest.cc |
| +++ b/cc/layers/picture_layer_impl_unittest.cc |
| @@ -1984,13 +1984,18 @@ TEST_F(PictureLayerImplTest, LayerEvictionTileIterator) { |
| std::set<Tile*> all_tiles_set(all_tiles.begin(), all_tiles.end()); |
| bool mark_required = false; |
| - for (std::vector<Tile*>::iterator it = all_tiles.begin(); |
| - it != all_tiles.end(); |
| - ++it) { |
| - Tile* tile = *it; |
| - if (mark_required) |
| - tile->MarkRequiredForActivation(); |
| - mark_required = !mark_required; |
| + for (size_t i = 0; i < tilings.size(); ++i) { |
| + PictureLayerTiling* tiling = tilings.at(i); |
| + for (PictureLayerTiling::CoverageIterator iter( |
| + tiling, |
| + pending_layer_->contents_scale_x(), |
| + pending_layer_->visible_content_rect()); |
| + iter; |
| + ++iter) { |
| + if (mark_required) |
| + iter->MarkRequiredForActivation(); |
| + mark_required = !mark_required; |
| + } |
|
sohanjg
2014/06/20 13:35:20
I think we shouldnt be iterating over all the tile
enne (OOO)
2014/06/25 18:33:07
I think that's an ok change. This is just a test,
vmpstr
2014/06/25 21:08:52
I agree with this change. I was considering making
sohanjg
2014/06/26 08:30:51
Done.
|
| } |
| // Sanity checks. |
| @@ -2064,7 +2069,6 @@ TEST_F(PictureLayerImplTest, LayerEvictionTileIterator) { |
| } |
| EXPECT_TRUE(reached_visible); |
| - EXPECT_TRUE(reached_required); |
|
sohanjg
2014/06/20 13:35:20
As mentioned above, this check is not required.
enne (OOO)
2014/06/25 18:33:07
This still seems valid to me. I don't understand.
|
| EXPECT_EQ(65u, unique_tiles.size()); |
| scale_index = 0; |