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

Side by Side Diff: cc/resources/tile_manager_unittest.cc

Issue 196343005: cc: Replace recorded region with direct map lookup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Partial invalidation test case Created 6 years, 9 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_perftest.cc ('k') | cc/test/fake_picture_layer_tiling_client.cc » ('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 "cc/resources/tile.h" 5 #include "cc/resources/tile.h"
6 #include "cc/resources/tile_priority.h" 6 #include "cc/resources/tile_priority.h"
7 #include "cc/test/fake_output_surface.h" 7 #include "cc/test/fake_output_surface.h"
8 #include "cc/test/fake_output_surface_client.h" 8 #include "cc/test/fake_output_surface_client.h"
9 #include "cc/test/fake_picture_pile_impl.h" 9 #include "cc/test/fake_picture_pile_impl.h"
10 #include "cc/test/fake_tile_manager.h" 10 #include "cc/test/fake_tile_manager.h"
(...skipping 20 matching lines...) Expand all
31 output_surface_ = FakeOutputSurface::Create3d(); 31 output_surface_ = FakeOutputSurface::Create3d();
32 CHECK(output_surface_->BindToClient(&output_surface_client_)); 32 CHECK(output_surface_->BindToClient(&output_surface_client_));
33 33
34 resource_provider_ = 34 resource_provider_ =
35 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1); 35 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1);
36 tile_manager_ = make_scoped_ptr(new FakeTileManager( 36 tile_manager_ = make_scoped_ptr(new FakeTileManager(
37 this, resource_provider_.get(), allow_on_demand_raster)); 37 this, resource_provider_.get(), allow_on_demand_raster));
38 38
39 memory_limit_policy_ = memory_limit_policy; 39 memory_limit_policy_ = memory_limit_policy;
40 max_tiles_ = max_tiles; 40 max_tiles_ = max_tiles;
41 picture_pile_ = FakePicturePileImpl::CreatePile(); 41 picture_pile_ = FakePicturePileImpl::CreateInfiniteFilledPile();
42 42
43 SetTreePriority(tree_priority); 43 SetTreePriority(tree_priority);
44 } 44 }
45 45
46 void SetTreePriority(TreePriority tree_priority) { 46 void SetTreePriority(TreePriority tree_priority) {
47 GlobalStateThatImpactsTilePriority state; 47 GlobalStateThatImpactsTilePriority state;
48 gfx::Size tile_size = settings_.default_tile_size; 48 gfx::Size tile_size = settings_.default_tile_size;
49 49
50 if (UsingMemoryLimit()) { 50 if (UsingMemoryLimit()) {
51 state.soft_memory_limit_in_bytes = 51 state.soft_memory_limit_in_bytes =
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 } 621 }
622 622
623 // If true, the max tile limit should be applied as bytes; if false, 623 // If true, the max tile limit should be applied as bytes; if false,
624 // as num_resources_limit. 624 // as num_resources_limit.
625 INSTANTIATE_TEST_CASE_P(TileManagerTests, 625 INSTANTIATE_TEST_CASE_P(TileManagerTests,
626 TileManagerTest, 626 TileManagerTest,
627 ::testing::Values(true, false)); 627 ::testing::Values(true, false));
628 628
629 } // namespace 629 } // namespace
630 } // namespace cc 630 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager_perftest.cc ('k') | cc/test/fake_picture_layer_tiling_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698