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

Side by Side Diff: cc/trees/layer_tree_host_unittest_context.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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "cc/debug/test_context_provider.h" 8 #include "cc/debug/test_context_provider.h"
9 #include "cc/debug/test_web_graphics_context_3d.h" 9 #include "cc/debug/test_web_graphics_context_3d.h"
10 #include "cc/layers/content_layer.h" 10 #include "cc/layers/content_layer.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 virtual void TearDown() OVERRIDE { 213 virtual void TearDown() OVERRIDE {
214 LayerTreeTest::TearDown(); 214 LayerTreeTest::TearDown();
215 EXPECT_EQ(times_to_expect_create_failed_, times_create_failed_); 215 EXPECT_EQ(times_to_expect_create_failed_, times_create_failed_);
216 } 216 }
217 217
218 void ExpectCreateToFail() { 218 void ExpectCreateToFail() {
219 ++times_to_expect_create_failed_; 219 ++times_to_expect_create_failed_;
220 } 220 }
221 221
222 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
223 settings->max_bytes_pending_upload = 16 * 1024 * 1024;
danakj 2013/08/22 19:41:20 Ya, why not just do this in LayerTreeTest before c
224 }
225
222 protected: 226 protected:
223 TestWebGraphicsContext3D* context3d_; 227 TestWebGraphicsContext3D* context3d_;
224 int times_to_fail_create_; 228 int times_to_fail_create_;
225 int times_to_fail_initialize_; 229 int times_to_fail_initialize_;
226 int times_to_lose_on_create_; 230 int times_to_lose_on_create_;
227 int times_to_lose_during_commit_; 231 int times_to_lose_during_commit_;
228 int times_to_lose_during_draw_; 232 int times_to_lose_during_draw_;
229 int times_to_fail_recreate_; 233 int times_to_fail_recreate_;
230 int times_to_fail_reinitialize_; 234 int times_to_fail_reinitialize_;
231 int times_to_lose_on_recreate_; 235 int times_to_lose_on_recreate_;
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 PostSetNeedsCommitToMainThread(); 1504 PostSetNeedsCommitToMainThread();
1501 } 1505 }
1502 1506
1503 virtual void AfterTest() OVERRIDE {} 1507 virtual void AfterTest() OVERRIDE {}
1504 1508
1505 virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE { 1509 virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE {
1506 EXPECT_TRUE(succeeded); 1510 EXPECT_TRUE(succeeded);
1507 EndTest(); 1511 EndTest();
1508 } 1512 }
1509 1513
1514 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
1515 settings->max_bytes_pending_upload = 16 * 1024 * 1024;
1516 }
1517
1510 private: 1518 private:
1511 FakeContentLayerClient client_; 1519 FakeContentLayerClient client_;
1512 }; 1520 };
1513 1521
1514 MULTI_THREAD_TEST_F(LayerTreeHostContextTestImplSidePainting); 1522 // MULTI_THREAD_TEST_F(LayerTreeHostContextTestImplSidePainting);
1515 1523
1516 class ScrollbarLayerLostContext : public LayerTreeHostContextTest { 1524 class ScrollbarLayerLostContext : public LayerTreeHostContextTest {
1517 public: 1525 public:
1518 ScrollbarLayerLostContext() : commits_(0) {} 1526 ScrollbarLayerLostContext() : commits_(0) {}
1519 1527
1520 virtual void BeginTest() OVERRIDE { 1528 virtual void BeginTest() OVERRIDE {
1521 scoped_refptr<Layer> scroll_layer = Layer::Create(); 1529 scoped_refptr<Layer> scroll_layer = Layer::Create();
1522 scrollbar_layer_ = FakeScrollbarLayer::Create( 1530 scrollbar_layer_ = FakeScrollbarLayer::Create(
1523 false, true, scroll_layer->id()); 1531 false, true, scroll_layer->id());
1524 scrollbar_layer_->SetBounds(gfx::Size(10, 100)); 1532 scrollbar_layer_->SetBounds(gfx::Size(10, 100));
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1900 RunTest(true, false, true); 1908 RunTest(true, false, true);
1901 } 1909 }
1902 1910
1903 TEST_F(UIResourceLostBeforeActivateTree, 1911 TEST_F(UIResourceLostBeforeActivateTree,
1904 RunMultiThread_DelegatingRenderer_ImplSidePaint) { 1912 RunMultiThread_DelegatingRenderer_ImplSidePaint) {
1905 RunTest(true, true, true); 1913 RunTest(true, true, true);
1906 } 1914 }
1907 1915
1908 } // namespace 1916 } // namespace
1909 } // namespace cc 1917 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698