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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 640873002: cc: Move RequiresHighResToDraw from tree to lthi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2972a7c4c2046083afbcc693a6a382fb5590498a..2fc8fff4793976ce564716670828b49a6dc262fa 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -2152,7 +2152,7 @@ TEST_F(LayerTreeHostImplTest, PrepareToDrawSucceedsWhenHighResRequired) {
had_incomplete_tile,
is_animating,
host_impl_->resource_provider()));
- host_impl_->active_tree()->SetRequiresHighResToDraw();
+ host_impl_->SetRequiresHighResToDraw();
LayerTreeHostImpl::FrameData frame2;
EXPECT_EQ(DRAW_SUCCESS, host_impl_->PrepareToDraw(&frame2));
host_impl_->DrawLayers(&frame2, gfx::FrameTime::Now());
@@ -2182,7 +2182,7 @@ TEST_F(LayerTreeHostImplTest,
had_incomplete_tile,
is_animating,
host_impl_->resource_provider()));
- host_impl_->active_tree()->SetRequiresHighResToDraw();
+ host_impl_->SetRequiresHighResToDraw();
LayerTreeHostImpl::FrameData frame2;
EXPECT_EQ(DRAW_ABORTED_MISSING_HIGH_RES_CONTENT,
host_impl_->PrepareToDraw(&frame2));
@@ -2213,7 +2213,7 @@ TEST_F(LayerTreeHostImplTest,
had_incomplete_tile,
is_animating,
host_impl_->resource_provider()));
- host_impl_->active_tree()->SetRequiresHighResToDraw();
+ host_impl_->SetRequiresHighResToDraw();
LayerTreeHostImpl::FrameData frame2;
EXPECT_EQ(DRAW_ABORTED_MISSING_HIGH_RES_CONTENT,
host_impl_->PrepareToDraw(&frame2));
@@ -6040,22 +6040,22 @@ TEST_F(LayerTreeHostImplTest, RequireHighResWhenVisible) {
ASSERT_TRUE(host_impl_->active_tree());
// RequiresHighResToDraw is set when new output surface is used.
- EXPECT_TRUE(host_impl_->active_tree()->RequiresHighResToDraw());
+ EXPECT_TRUE(host_impl_->RequiresHighResToDraw());
- host_impl_->active_tree()->ResetRequiresHighResToDraw();
+ host_impl_->ResetRequiresHighResToDraw();
host_impl_->SetVisible(false);
- EXPECT_FALSE(host_impl_->active_tree()->RequiresHighResToDraw());
+ EXPECT_FALSE(host_impl_->RequiresHighResToDraw());
host_impl_->SetVisible(true);
- EXPECT_TRUE(host_impl_->active_tree()->RequiresHighResToDraw());
+ EXPECT_TRUE(host_impl_->RequiresHighResToDraw());
host_impl_->SetVisible(false);
- EXPECT_TRUE(host_impl_->active_tree()->RequiresHighResToDraw());
+ EXPECT_TRUE(host_impl_->RequiresHighResToDraw());
- host_impl_->active_tree()->ResetRequiresHighResToDraw();
+ host_impl_->ResetRequiresHighResToDraw();
- EXPECT_FALSE(host_impl_->active_tree()->RequiresHighResToDraw());
+ EXPECT_FALSE(host_impl_->RequiresHighResToDraw());
host_impl_->SetVisible(true);
- EXPECT_TRUE(host_impl_->active_tree()->RequiresHighResToDraw());
+ EXPECT_TRUE(host_impl_->RequiresHighResToDraw());
}
TEST_F(LayerTreeHostImplTest, RequireHighResAfterGpuRasterizationToggles) {
@@ -6063,22 +6063,22 @@ TEST_F(LayerTreeHostImplTest, RequireHighResAfterGpuRasterizationToggles) {
EXPECT_FALSE(host_impl_->use_gpu_rasterization());
// RequiresHighResToDraw is set when new output surface is used.
- EXPECT_TRUE(host_impl_->active_tree()->RequiresHighResToDraw());
+ EXPECT_TRUE(host_impl_->RequiresHighResToDraw());
- host_impl_->active_tree()->ResetRequiresHighResToDraw();
+ host_impl_->ResetRequiresHighResToDraw();
host_impl_->SetUseGpuRasterization(false);
- EXPECT_FALSE(host_impl_->active_tree()->RequiresHighResToDraw());
+ EXPECT_FALSE(host_impl_->RequiresHighResToDraw());
host_impl_->SetUseGpuRasterization(true);
- EXPECT_TRUE(host_impl_->active_tree()->RequiresHighResToDraw());
+ EXPECT_TRUE(host_impl_->RequiresHighResToDraw());
host_impl_->SetUseGpuRasterization(false);
- EXPECT_TRUE(host_impl_->active_tree()->RequiresHighResToDraw());
+ EXPECT_TRUE(host_impl_->RequiresHighResToDraw());
- host_impl_->active_tree()->ResetRequiresHighResToDraw();
+ host_impl_->ResetRequiresHighResToDraw();
- EXPECT_FALSE(host_impl_->active_tree()->RequiresHighResToDraw());
+ EXPECT_FALSE(host_impl_->RequiresHighResToDraw());
host_impl_->SetUseGpuRasterization(true);
- EXPECT_TRUE(host_impl_->active_tree()->RequiresHighResToDraw());
+ EXPECT_TRUE(host_impl_->RequiresHighResToDraw());
}
class LayerTreeHostImplTestManageTiles : public LayerTreeHostImplTest {
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698