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

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

Issue 266743003: Add flag to enable rendering of text using signed distance fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix uses of ResourceProvider::Create() outside of Chrome proper. 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
« no previous file with comments | « cc/resources/tile_manager_perftest.cc ('k') | cc/resources/video_resource_updater_unittest.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_impl_proxy.h" 7 #include "cc/test/fake_impl_proxy.h"
8 #include "cc/test/fake_layer_tree_host_impl.h" 8 #include "cc/test/fake_layer_tree_host_impl.h"
9 #include "cc/test/fake_output_surface.h" 9 #include "cc/test/fake_output_surface.h"
10 #include "cc/test/fake_output_surface_client.h" 10 #include "cc/test/fake_output_surface_client.h"
(...skipping 21 matching lines...) Expand all
32 32
33 void Initialize(int max_tiles, 33 void Initialize(int max_tiles,
34 TileMemoryLimitPolicy memory_limit_policy, 34 TileMemoryLimitPolicy memory_limit_policy,
35 TreePriority tree_priority, 35 TreePriority tree_priority,
36 bool allow_on_demand_raster = true) { 36 bool allow_on_demand_raster = true) {
37 output_surface_ = FakeOutputSurface::Create3d(); 37 output_surface_ = FakeOutputSurface::Create3d();
38 CHECK(output_surface_->BindToClient(&output_surface_client_)); 38 CHECK(output_surface_->BindToClient(&output_surface_client_));
39 39
40 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); 40 shared_bitmap_manager_.reset(new TestSharedBitmapManager());
41 resource_provider_ = ResourceProvider::Create( 41 resource_provider_ = ResourceProvider::Create(
42 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1); 42 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1,
43 false);
43 resource_pool_ = ResourcePool::Create( 44 resource_pool_ = ResourcePool::Create(
44 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); 45 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888);
45 tile_manager_ = make_scoped_ptr(new FakeTileManager( 46 tile_manager_ = make_scoped_ptr(new FakeTileManager(
46 this, resource_pool_.get(), allow_on_demand_raster)); 47 this, resource_pool_.get(), allow_on_demand_raster));
47 48
48 memory_limit_policy_ = memory_limit_policy; 49 memory_limit_policy_ = memory_limit_policy;
49 max_tiles_ = max_tiles; 50 max_tiles_ = max_tiles;
50 picture_pile_ = FakePicturePileImpl::CreateInfiniteFilledPile(); 51 picture_pile_ = FakePicturePileImpl::CreateInfiniteFilledPile();
51 52
52 SetTreePriority(tree_priority); 53 SetTreePriority(tree_priority);
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 1133
1133 last_tile = tile; 1134 last_tile = tile;
1134 new_content_tiles.insert(tile); 1135 new_content_tiles.insert(tile);
1135 } 1136 }
1136 1137
1137 EXPECT_EQ(tile_count, new_content_tiles.size()); 1138 EXPECT_EQ(tile_count, new_content_tiles.size());
1138 EXPECT_EQ(all_tiles, new_content_tiles); 1139 EXPECT_EQ(all_tiles, new_content_tiles);
1139 } 1140 }
1140 } // namespace 1141 } // namespace
1141 } // namespace cc 1142 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager_perftest.cc ('k') | cc/resources/video_resource_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698