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

Side by Side Diff: cc/trees/layer_tree_host_unittest.cc

Issue 270333003: cc: Do not limit number of raster tasks for upload limit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed TileManagerPerfTest 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 4493 matching lines...) Expand 10 before | Expand all | Expand 10 after
4504 int num_impl_commits_; 4504 int num_impl_commits_;
4505 }; 4505 };
4506 4506
4507 // Commits can only be aborted when using the thread proxy. 4507 // Commits can only be aborted when using the thread proxy.
4508 MULTI_THREAD_TEST_F(LayerTreeHostTestAbortEvictedTextures); 4508 MULTI_THREAD_TEST_F(LayerTreeHostTestAbortEvictedTextures);
4509 4509
4510 class LayerTreeHostTestMaxTransferBufferUsageBytes : public LayerTreeHostTest { 4510 class LayerTreeHostTestMaxTransferBufferUsageBytes : public LayerTreeHostTest {
4511 protected: 4511 protected:
4512 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { 4512 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
4513 settings->impl_side_painting = true; 4513 settings->impl_side_painting = true;
4514 settings->default_tile_size = gfx::Size(128, 128);
4515 } 4514 }
4516 4515
4517 virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback) 4516 virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback)
4518 OVERRIDE { 4517 OVERRIDE {
4519 scoped_refptr<TestContextProvider> context_provider = 4518 scoped_refptr<TestContextProvider> context_provider =
4520 TestContextProvider::Create(); 4519 TestContextProvider::Create();
4521 context_provider->SetMaxTransferBufferUsageBytes(1024 * 1024); 4520 context_provider->SetMaxTransferBufferUsageBytes(1024 * 1024);
4522 if (delegating_renderer()) 4521 if (delegating_renderer())
4523 return FakeOutputSurface::CreateDelegating3d(context_provider); 4522 return FakeOutputSurface::CreateDelegating3d(context_provider);
4524 else 4523 else
(...skipping 10 matching lines...) Expand all
4535 LayerTreeHostTest::SetupTree(); 4534 LayerTreeHostTest::SetupTree();
4536 } 4535 }
4537 4536
4538 virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); } 4537 virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); }
4539 4538
4540 virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { 4539 virtual void DidActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE {
4541 TestWebGraphicsContext3D* context = TestContext(); 4540 TestWebGraphicsContext3D* context = TestContext();
4542 4541
4543 // Expect that the transfer buffer memory used is equal to the 4542 // Expect that the transfer buffer memory used is equal to the
4544 // MaxTransferBufferUsageBytes value set in CreateOutputSurface. 4543 // MaxTransferBufferUsageBytes value set in CreateOutputSurface.
4545 // NOTE: This is now 1/2 due to raster memory limit in TileManager. 4544 EXPECT_EQ(1024 * 1024u, context->GetTransferBufferMemoryUsedBytes());
4546 // Only half the limit will be reached unless the task set
4547 // thrashes to a completly new set of tiles.
4548 EXPECT_EQ(512 * 1024u, context->GetPeakTransferBufferMemoryUsedBytes());
4549 EndTest(); 4545 EndTest();
4550 } 4546 }
4551 4547
4552 virtual void AfterTest() OVERRIDE {} 4548 virtual void AfterTest() OVERRIDE {}
4553 4549
4554 private: 4550 private:
4555 FakeContentLayerClient client_; 4551 FakeContentLayerClient client_;
4556 }; 4552 };
4557 4553
4558 // Impl-side painting is a multi-threaded compositor feature. 4554 // Impl-side painting is a multi-threaded compositor feature.
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
5287 const gfx::Size bounds_; 5283 const gfx::Size bounds_;
5288 FakeContentLayerClient client_; 5284 FakeContentLayerClient client_;
5289 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_; 5285 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_;
5290 scoped_refptr<FakePictureLayer> picture_layer_; 5286 scoped_refptr<FakePictureLayer> picture_layer_;
5291 Layer* child_layer_; 5287 Layer* child_layer_;
5292 }; 5288 };
5293 5289
5294 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); 5290 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting);
5295 5291
5296 } // namespace cc 5292 } // namespace cc
OLDNEW
« 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