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

Unified Diff: cc/trees/layer_tree_host_unittest_damage.cc

Issue 22900018: cc: Set the mapped memory reclaim limit for the renderer compositor on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment Created 7 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_unittest_damage.cc
diff --git a/cc/trees/layer_tree_host_unittest_damage.cc b/cc/trees/layer_tree_host_unittest_damage.cc
index 3eee02ca275931ce49f31760650a542aac8442c2..d923e974acab92236acf53af0b2601e57bd4317c 100644
--- a/cc/trees/layer_tree_host_unittest_damage.cc
+++ b/cc/trees/layer_tree_host_unittest_damage.cc
@@ -99,6 +99,10 @@ class LayerTreeHostDamageTestNoDamageDoesNotSwap
EXPECT_EQ(expect_swap_and_succeed_, did_swap_and_succeed_);
}
+ virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
+ settings->max_bytes_pending_upload = 16 * 1024 * 1024;
+ }
+
FakeContentLayerClient client_;
scoped_refptr<FakeContentLayer> content_;
int expect_swap_and_succeed_;
@@ -173,6 +177,10 @@ class LayerTreeHostDamageTestNoDamageReadbackDoesDraw
virtual void AfterTest() OVERRIDE {}
+ virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
+ settings->max_bytes_pending_upload = 16 * 1024 * 1024;
+ }
+
FakeContentLayerClient client_;
scoped_refptr<FakeContentLayer> content_;
};
@@ -278,6 +286,10 @@ class LayerTreeHostDamageTestForcedFullDamage : public LayerTreeHostDamageTest {
virtual void AfterTest() OVERRIDE {}
+ virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
+ settings->max_bytes_pending_upload = 16 * 1024 * 1024;
+ }
+
FakeContentLayerClient client_;
scoped_refptr<FakeContentLayer> root_;
scoped_refptr<FakeContentLayer> child_;
@@ -295,7 +307,7 @@ class LayerTreeHostDamageTestScrollbarDoesDamage
virtual void SetupTree() OVERRIDE {
scoped_refptr<Layer> root_layer = Layer::Create();
- root_layer->SetBounds(gfx::Size(400,400));
+ root_layer->SetBounds(gfx::Size(400, 400));
layer_tree_host()->SetRootLayer(root_layer);
scoped_refptr<Layer> content_layer = FakeContentLayer::Create(&client_);
@@ -362,12 +374,12 @@ class LayerTreeHostDamageTestScrollbarDoesDamage
// scrolling) won't damage the scrollbar. Do this before the other
// tests, as they can cause commits that will later damage the
// scrollbar. http://crbug.com/276657
- scroll_layer->SetPosition(gfx::Point(1,1));
+ scroll_layer->SetPosition(gfx::Point(1, 1));
scroll_layer->SetScrollOffset(scroll_layer->scroll_offset());
host_impl->SetNeedsRedraw();
break;
case 2:
- host_impl->ScrollBegin(gfx::Point(1,1), InputHandler::Wheel);
+ host_impl->ScrollBegin(gfx::Point(1, 1), InputHandler::Wheel);
EXPECT_TRUE(host_impl->ScrollBy(gfx::Point(),
gfx::Vector2dF(10.0, 10.0)));
break;
@@ -376,13 +388,16 @@ class LayerTreeHostDamageTestScrollbarDoesDamage
host_impl->SetNeedsRedraw();
break;
}
-
}
virtual void AfterTest() OVERRIDE {
EXPECT_EQ(4, did_swaps_);
}
+ virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
+ settings->max_bytes_pending_upload = 16 * 1024 * 1024;
+ }
+
FakeContentLayerClient client_;
int did_swaps_;
};

Powered by Google App Engine
This is Rietveld 408576698