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

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: review 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
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/resources/tile_manager.h » ('j') | 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 875c8b0ef38809c803b4d457e23e0a0bff119271..5ef1a653cca3f5537ad6c82df30a70b174144da2 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -3412,18 +3412,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) {
@@ -3435,13 +3435,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,
@@ -3459,11 +3459,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) {
@@ -3478,11 +3478,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) {
@@ -4889,7 +4889,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).
@@ -4916,7 +4916,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) {
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/resources/tile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698