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

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

Issue 485043003: cc: Use correct message loop proxy in BlockingTaskRunner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits. Created 6 years, 3 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/single_release_callback_impl.cc ('k') | cc/resources/video_resource_updater.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 "cc/resources/eviction_tile_priority_queue.h" 5 #include "cc/resources/eviction_tile_priority_queue.h"
6 #include "cc/resources/raster_tile_priority_queue.h" 6 #include "cc/resources/raster_tile_priority_queue.h"
7 #include "cc/resources/tile.h" 7 #include "cc/resources/tile.h"
8 #include "cc/resources/tile_priority.h" 8 #include "cc/resources/tile_priority.h"
9 #include "cc/test/fake_impl_proxy.h" 9 #include "cc/test/fake_impl_proxy.h"
10 #include "cc/test/fake_layer_tree_host_impl.h" 10 #include "cc/test/fake_layer_tree_host_impl.h"
(...skipping 21 matching lines...) Expand all
32 max_tiles_(0), 32 max_tiles_(0),
33 ready_to_activate_(false) {} 33 ready_to_activate_(false) {}
34 34
35 void Initialize(int max_tiles, 35 void Initialize(int max_tiles,
36 TileMemoryLimitPolicy memory_limit_policy, 36 TileMemoryLimitPolicy memory_limit_policy,
37 TreePriority tree_priority) { 37 TreePriority tree_priority) {
38 output_surface_ = FakeOutputSurface::Create3d(); 38 output_surface_ = FakeOutputSurface::Create3d();
39 CHECK(output_surface_->BindToClient(&output_surface_client_)); 39 CHECK(output_surface_->BindToClient(&output_surface_client_));
40 40
41 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); 41 shared_bitmap_manager_.reset(new TestSharedBitmapManager());
42 resource_provider_ = ResourceProvider::Create( 42 resource_provider_ = ResourceProvider::Create(output_surface_.get(),
43 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1, 43 shared_bitmap_manager_.get(),
44 false); 44 NULL,
45 0,
46 false,
47 1,
48 false);
45 resource_pool_ = ResourcePool::Create( 49 resource_pool_ = ResourcePool::Create(
46 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); 50 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888);
47 tile_manager_ = 51 tile_manager_ =
48 make_scoped_ptr(new FakeTileManager(this, resource_pool_.get())); 52 make_scoped_ptr(new FakeTileManager(this, resource_pool_.get()));
49 53
50 memory_limit_policy_ = memory_limit_policy; 54 memory_limit_policy_ = memory_limit_policy;
51 max_tiles_ = max_tiles; 55 max_tiles_ = max_tiles;
52 picture_pile_ = FakePicturePileImpl::CreateInfiniteFilledPile(); 56 picture_pile_ = FakePicturePileImpl::CreateInfiniteFilledPile();
53 57
54 SetTreePriority(tree_priority); 58 SetTreePriority(tree_priority);
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 all_tiles.insert(queue.Top()); 1213 all_tiles.insert(queue.Top());
1210 ++tile_count; 1214 ++tile_count;
1211 queue.Pop(); 1215 queue.Pop();
1212 } 1216 }
1213 EXPECT_EQ(tile_count, all_tiles.size()); 1217 EXPECT_EQ(tile_count, all_tiles.size());
1214 EXPECT_EQ(17u, tile_count); 1218 EXPECT_EQ(17u, tile_count);
1215 } 1219 }
1216 1220
1217 } // namespace 1221 } // namespace
1218 } // namespace cc 1222 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/single_release_callback_impl.cc ('k') | cc/resources/video_resource_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698