summaryrefslogtreecommitdiffstats
path: root/cc/layers/picture_layer_impl_unittest.cc
diff options
context:
space:
mode:
authorkbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-24 00:52:38 +0000
committerkbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-24 00:52:38 +0000
commitafbee36d83e71dfe1dac945a268256281c1cee95 (patch)
treee7e593056cb1fc6893cd38590cc54ac0d8971c6f /cc/layers/picture_layer_impl_unittest.cc
parentdb01231e0efc97413ac41fb0625d56010189f2d5 (diff)
downloadchromium_src-afbee36d83e71dfe1dac945a268256281c1cee95.zip
chromium_src-afbee36d83e71dfe1dac945a268256281c1cee95.tar.gz
chromium_src-afbee36d83e71dfe1dac945a268256281c1cee95.tar.bz2
Revert 272635 "cc: Examine layers to determine if we're ready to..."
Caused layout test failures and out-of-memory errors on several Mac bots on the Blink waterfall. See Issue 375206. BUG=375206 > cc: Examine layers to determine if we're ready to activate. > > This introduces a new mechanism for determining when > we're ready to activate the pending tree. The tile > priority is still used to determine when it's worth > waking up the compositor thread and evaluating if > we can activate. However, the actual check that > determines if we're ready to activate doesn't rely > on the state of scheduled raster tasks but is a > synchronous call on each layer. > > The result is a pending tree activation mechanism that > is much easier to debug and validate for correctness, > while still providing the performance benefits of the > old mechanism by taking the "required to activate" field > of the tile priority into account when scheduling tasks. > > BUG=375206 > TEST=cc_unittests --gtest_filter=PictureLayerImplTest.AllTilesRequiredForActivationAreReadyToDraw > > Review URL: https://codereview.chromium.org/287643004 TBR=reveman@chromium.org Review URL: https://codereview.chromium.org/301493002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272660 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/picture_layer_impl_unittest.cc')
-rw-r--r--cc/layers/picture_layer_impl_unittest.cc56
1 files changed, 0 insertions, 56 deletions
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index 64454ae..d919298 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -2391,61 +2391,5 @@ TEST_F(PictureLayerImplTest, RasterScaleChangeWithoutAnimation) {
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