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

Side by Side Diff: cc/resources/tile_manager_perftest.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/resources/tile_manager.cc ('k') | cc/test/fake_tile_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/time/time.h" 5 #include "base/time/time.h"
6 #include "cc/resources/tile.h" 6 #include "cc/resources/tile.h"
7 #include "cc/resources/tile_priority.h" 7 #include "cc/resources/tile_priority.h"
8 #include "cc/test/fake_impl_proxy.h" 8 #include "cc/test/fake_impl_proxy.h"
9 #include "cc/test/fake_layer_tree_host_impl.h" 9 #include "cc/test/fake_layer_tree_host_impl.h"
10 #include "cc/test/fake_output_surface.h" 10 #include "cc/test/fake_output_surface.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 virtual void SetUp() OVERRIDE { 44 virtual void SetUp() OVERRIDE {
45 output_surface_ = FakeOutputSurface::Create3d(); 45 output_surface_ = FakeOutputSurface::Create3d();
46 CHECK(output_surface_->BindToClient(&output_surface_client_)); 46 CHECK(output_surface_->BindToClient(&output_surface_client_));
47 47
48 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); 48 shared_bitmap_manager_.reset(new TestSharedBitmapManager());
49 resource_provider_ = ResourceProvider::Create( 49 resource_provider_ = ResourceProvider::Create(
50 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1, 50 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1,
51 false); 51 false);
52 resource_pool_ = ResourcePool::Create( 52 resource_pool_ = ResourcePool::Create(
53 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); 53 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888);
54 size_t raster_task_limit_bytes = 32 * 1024 * 1024; // 16-64MB in practice. 54 tile_manager_ = make_scoped_ptr(
55 tile_manager_ = make_scoped_ptr(new FakeTileManager( 55 new FakeTileManager(&tile_manager_client_, resource_pool_.get()));
56 &tile_manager_client_, resource_pool_.get(), raster_task_limit_bytes));
57 picture_pile_ = FakePicturePileImpl::CreateInfiniteFilledPile(); 56 picture_pile_ = FakePicturePileImpl::CreateInfiniteFilledPile();
58 } 57 }
59 58
60 GlobalStateThatImpactsTilePriority GlobalStateForTest() { 59 GlobalStateThatImpactsTilePriority GlobalStateForTest() {
61 GlobalStateThatImpactsTilePriority state; 60 GlobalStateThatImpactsTilePriority state;
62 gfx::Size tile_size = settings_.default_tile_size; 61 gfx::Size tile_size = settings_.default_tile_size;
63 state.soft_memory_limit_in_bytes = 62 state.soft_memory_limit_in_bytes =
64 10000u * 4u * 63 10000u * 4u *
65 static_cast<size_t>(tile_size.width() * tile_size.height()); 64 static_cast<size_t>(tile_size.width() * tile_size.height());
66 state.hard_memory_limit_in_bytes = state.soft_memory_limit_in_bytes; 65 state.hard_memory_limit_in_bytes = state.soft_memory_limit_in_bytes;
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 348
350 RunTest("2_16", 16); 349 RunTest("2_16", 16);
351 RunTest("2_32", 32); 350 RunTest("2_32", 32);
352 RunTest("2_64", 64); 351 RunTest("2_64", 64);
353 RunTest("2_128", 128); 352 RunTest("2_128", 128);
354 } 353 }
355 354
356 } // namespace 355 } // namespace
357 356
358 } // namespace cc 357 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager.cc ('k') | cc/test/fake_tile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698