Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Unified Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 330003003: cc: Pass ideal contents scale to PictureLayerTiling UpdateTilePriorities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated test Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698