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

Unified Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 868803002: cc: Change the activation/ready for draw check from layer to queue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment format Created 5 years, 11 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
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 0f4bf8d1d5a97d398f7d3dfc9b65d584c0a41fc5..4765069571b90f558fdde6583ee3b77b1c26836b 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -3252,18 +3252,18 @@ TEST_F(PictureLayerImplTest, LowResReadyToDrawNotEnoughToActivate) {
SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size, invalidation);
// All pending layer tiles required are not ready.
- EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
+ EXPECT_FALSE(host_impl_.tile_manager()->IsReadyToActivate());
// Initialize all low-res tiles.
pending_layer_->SetAllTilesReadyInTiling(pending_layer_->LowResTiling());
// Low-res tiles should not be enough.
- EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
+ EXPECT_FALSE(host_impl_.tile_manager()->IsReadyToActivate());
// Initialize remaining tiles.
pending_layer_->SetAllTilesReady();
- EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
+ EXPECT_TRUE(host_impl_.tile_manager()->IsReadyToActivate());
}
TEST_F(PictureLayerImplTest, HighResReadyToDrawEnoughToActivate) {
@@ -3275,13 +3275,13 @@ TEST_F(PictureLayerImplTest, HighResReadyToDrawEnoughToActivate) {
SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size, invalidation);
// All pending layer tiles required are not ready.
- EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
+ EXPECT_FALSE(host_impl_.tile_manager()->IsReadyToActivate());
// Initialize all high-res tiles.
pending_layer_->SetAllTilesReadyInTiling(pending_layer_->HighResTiling());
// High-res tiles should be enough, since they cover everything visible.
- EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
+ EXPECT_TRUE(host_impl_.tile_manager()->IsReadyToActivate());
}
TEST_F(PictureLayerImplTest,
@@ -3299,11 +3299,11 @@ TEST_F(PictureLayerImplTest,
pending_layer_->SetAllTilesReadyInTiling(pending_layer_->LowResTiling());
// The unshared high-res tiles are not ready, so we cannot activate.
- EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
+ EXPECT_FALSE(host_impl_.tile_manager()->IsReadyToActivate());
// When the unshared pending high-res tiles are ready, we can activate.
pending_layer_->SetAllTilesReadyInTiling(pending_layer_->HighResTiling());
- EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
+ EXPECT_TRUE(host_impl_.tile_manager()->IsReadyToActivate());
}
TEST_F(PictureLayerImplTest, SharedActiveHighResReadyNotEnoughToActivate) {
@@ -3318,11 +3318,11 @@ TEST_F(PictureLayerImplTest, SharedActiveHighResReadyNotEnoughToActivate) {
active_layer_->SetAllTilesReadyInTiling(active_layer_->HighResTiling());
// The unshared high-res tiles are not ready, so we cannot activate.
- EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
+ EXPECT_FALSE(host_impl_.tile_manager()->IsReadyToActivate());
// When the unshared pending high-res tiles are ready, we can activate.
pending_layer_->SetAllTilesReadyInTiling(pending_layer_->HighResTiling());
- EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
+ EXPECT_TRUE(host_impl_.tile_manager()->IsReadyToActivate());
}
TEST_F(NoLowResPictureLayerImplTest, ManageTilingsCreatesTilings) {
@@ -4729,7 +4729,7 @@ TEST_F(PictureLayerImplTest, ChangeInViewportAllowsTilingUpdates) {
pending_layer_->HighResTiling()->UpdateAllTilePrioritiesForTesting();
// Ensure we can't activate.
- EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
+ EXPECT_FALSE(host_impl_.tile_manager()->IsReadyToActivate());
// Now in the same frame, move the viewport (this can happen during
// animation).
@@ -4756,7 +4756,7 @@ TEST_F(PictureLayerImplTest, ChangeInViewportAllowsTilingUpdates) {
host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(tiles);
// Ensure we can activate.
- EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
+ EXPECT_TRUE(host_impl_.tile_manager()->IsReadyToActivate());
}
TEST_F(PictureLayerImplTest, CloneMissingRecordings) {

Powered by Google App Engine
This is Rietveld 408576698