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

Unified Diff: trunk/src/cc/layers/picture_layer_impl_unittest.cc

Issue 301493002: Revert 272635 "cc: Examine layers to determine if we're ready to..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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 | « trunk/src/cc/layers/picture_layer_impl.cc ('k') | trunk/src/cc/resources/tile_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/cc/layers/picture_layer_impl_unittest.cc
===================================================================
--- trunk/src/cc/layers/picture_layer_impl_unittest.cc (revision 272659)
+++ trunk/src/cc/layers/picture_layer_impl_unittest.cc (working copy)
@@ -2391,61 +2391,5 @@
EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 1.f);
}
-TEST_F(PictureLayerImplTest, LowResReadyToDrawNotEnoughToActivate) {
- gfx::Size tile_size(100, 100);
- gfx::Size layer_bounds(1000, 1000);
-
- SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
-
- // Make sure some tiles are not shared.
- pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size));
-
- CreateHighLowResAndSetAllTilesVisible();
- active_layer_->SetAllTilesReady();
- pending_layer_->MarkVisibleResourcesAsRequired();
-
- // All pending layer tiles required are not ready.
- EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
-
- // Initialize all low-res tiles.
- pending_layer_->SetAllTilesReadyInTiling(pending_layer_->LowResTiling());
-
- // Low-res tiles should not be enough.
- EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
-
- // Initialize remaining tiles.
- pending_layer_->SetAllTilesReady();
-
- EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
-}
-
-TEST_F(PictureLayerImplTest, HighResReadyToDrawNotEnoughToActivate) {
- gfx::Size tile_size(100, 100);
- gfx::Size layer_bounds(1000, 1000);
-
- SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
-
- // Make sure some tiles are not shared.
- pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size));
-
- CreateHighLowResAndSetAllTilesVisible();
- active_layer_->SetAllTilesReady();
- pending_layer_->MarkVisibleResourcesAsRequired();
-
- // All pending layer tiles required are not ready.
- EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
-
- // Initialize all high-res tiles.
- pending_layer_->SetAllTilesReadyInTiling(pending_layer_->HighResTiling());
-
- // High-res tiles should not be enough.
- EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
-
- // Initialize remaining tiles.
- pending_layer_->SetAllTilesReady();
-
- EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
-}
-
} // namespace
} // namespace cc
« no previous file with comments | « trunk/src/cc/layers/picture_layer_impl.cc ('k') | trunk/src/cc/resources/tile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698