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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 287553003: cc: Set requires high res upon becoming visible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +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
« cc/trees/layer_tree_host_impl.cc ('K') | « 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 80f250ebe892e4891561617886e7e0e4b063a96d..87fd7d11cc10300bd6eedd2234c81768805782b5 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -5740,6 +5740,24 @@ TEST_F(LayerTreeHostImplTest, MemoryPolicy) {
EXPECT_EQ(nothing_cutoff_value, current_priority_cutoff_value_);
}
+TEST_F(LayerTreeHostImplTest, RequireHighResWhenVisible) {
+ ASSERT_TRUE(host_impl_->active_tree());
+
danakj 2014/05/13 18:14:26 can you verify the state of RequiresHighResToDraw
+ host_impl_->SetVisible(false);
+ EXPECT_FALSE(host_impl_->active_tree()->RequiresHighResToDraw());
+ host_impl_->SetVisible(true);
+ EXPECT_TRUE(host_impl_->active_tree()->RequiresHighResToDraw());
+ host_impl_->SetVisible(false);
+ EXPECT_TRUE(host_impl_->active_tree()->RequiresHighResToDraw());
+
+ host_impl_->CreatePendingTree();
+ host_impl_->ActivatePendingTree();
+
+ EXPECT_FALSE(host_impl_->active_tree()->RequiresHighResToDraw());
+ host_impl_->SetVisible(true);
+ EXPECT_TRUE(host_impl_->active_tree()->RequiresHighResToDraw());
+}
+
class LayerTreeHostImplTestManageTiles : public LayerTreeHostImplTest {
public:
virtual void SetUp() OVERRIDE {
« cc/trees/layer_tree_host_impl.cc ('K') | « 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