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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 272033002: cc: fix pre-painting trigger for GPU rasterization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update unit test. 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 | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | 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 02f383fbc60c2c89248898ecfb5abdfb9551ee7f..3181410eeb9529a7394f5ba16652e4e262e83eff 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -5767,9 +5767,9 @@ TEST_F(LayerTreeHostImplTest, MemoryPolicy) {
int nothing_cutoff_value = ManagedMemoryPolicy::PriorityCutoffToValue(
gpu::MemoryAllocation::CUTOFF_ALLOW_NOTHING);
- // GPU rasterization should be disabled by default.
- EXPECT_FALSE(host_impl_->settings().gpu_rasterization_enabled);
- EXPECT_FALSE(host_impl_->settings().gpu_rasterization_forced);
+ // GPU rasterization should be disabled by default on the tree(s)
+ EXPECT_FALSE(host_impl_->active_tree()->use_gpu_rasterization());
+ EXPECT_TRUE(host_impl_->pending_tree() == NULL);
host_impl_->SetVisible(true);
host_impl_->SetMemoryPolicy(policy1);
@@ -5784,13 +5784,13 @@ TEST_F(LayerTreeHostImplTest, MemoryPolicy) {
EXPECT_EQ(policy1.bytes_limit_when_visible, current_limit_bytes_);
EXPECT_EQ(everything_cutoff_value, current_priority_cutoff_value_);
- // Now enable GPU rasterization and test if we get required only cutoff,
+ // Now enable GPU rasterization and test if we get nice to have cutoff,
// when visible.
LayerTreeSettings settings;
- settings.gpu_rasterization_forced = true;
+ settings.gpu_rasterization_enabled = true;
host_impl_ = LayerTreeHostImpl::Create(
settings, this, &proxy_, &stats_instrumentation_, NULL, 0);
-
+ host_impl_->active_tree()->SetUseGpuRasterization(true);
host_impl_->SetVisible(true);
host_impl_->SetMemoryPolicy(policy1);
EXPECT_EQ(policy1.bytes_limit_when_visible, current_limit_bytes_);
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698