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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 478703002: Remove cc::LayerTreeHostImpl::IsContextLost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ctx4
Patch Set: DoComposite draws even if context lost (fixed comments) Created 6 years, 4 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/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 1322f835e08d0e75f29d17c3aba64ed729847e98..47e79235423b1761cc3ac5dd67d68133cde38c6e 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -7011,23 +7011,14 @@ class LayerTreeHostImplCountingLostSurfaces : public LayerTreeHostImplTest {
};
TEST_F(LayerTreeHostImplCountingLostSurfaces, TwiceLostSurface) {
- // The medium term, we plan to remove LayerTreeHostImpl::IsContextLost().
- // Until then, we need the state variable
- // LayerTreeHostImpl::have_valid_output_surface_ and we can
- // enforce the following behaviour, where calling DidLoseOutputSurface
- // twice in a row only causes one subsequent
- // call to LayerTreeHostImplClient::DidLoseOutputSurfaceOnImplThread().
// Really we just need at least one client notification each time
// we go from having a valid output surface to not having a valid output
// surface.
EXPECT_EQ(0, num_lost_surfaces_);
- EXPECT_FALSE(host_impl_->IsContextLost());
host_impl_->DidLoseOutputSurface();
- EXPECT_TRUE(host_impl_->IsContextLost());
EXPECT_EQ(1, num_lost_surfaces_);
host_impl_->DidLoseOutputSurface();
- EXPECT_TRUE(host_impl_->IsContextLost());
- EXPECT_EQ(1, num_lost_surfaces_);
+ EXPECT_LE(1, num_lost_surfaces_);
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698