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

Side by Side Diff: cc/tiles/picture_layer_tiling_set_unittest.cc

Issue 2171143002: cc: Get rid of non-delegated rendering in most cc unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@killdirecttests
Patch Set: fakeoutputsurface: no-constructor Created 4 years, 5 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/test/test_layer_tree_host_base.cc ('k') | cc/tiles/tile_manager_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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/tiles/picture_layer_tiling_set.h" 5 #include "cc/tiles/picture_layer_tiling_set.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "cc/resources/resource_provider.h" 10 #include "cc/resources/resource_provider.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 229
230 class PictureLayerTilingSetTestWithResources : public testing::Test { 230 class PictureLayerTilingSetTestWithResources : public testing::Test {
231 public: 231 public:
232 void RunTest(int num_tilings, 232 void RunTest(int num_tilings,
233 float min_scale, 233 float min_scale,
234 float scale_increment, 234 float scale_increment,
235 float ideal_contents_scale, 235 float ideal_contents_scale,
236 float expected_scale) { 236 float expected_scale) {
237 FakeOutputSurfaceClient output_surface_client; 237 FakeOutputSurfaceClient output_surface_client;
238 std::unique_ptr<FakeOutputSurface> output_surface = 238 std::unique_ptr<FakeOutputSurface> output_surface =
239 FakeOutputSurface::Create3d(); 239 FakeOutputSurface::CreateDelegating3d();
240 CHECK(output_surface->BindToClient(&output_surface_client)); 240 CHECK(output_surface->BindToClient(&output_surface_client));
241 241
242 std::unique_ptr<SharedBitmapManager> shared_bitmap_manager( 242 std::unique_ptr<SharedBitmapManager> shared_bitmap_manager(
243 new TestSharedBitmapManager()); 243 new TestSharedBitmapManager());
244 std::unique_ptr<ResourceProvider> resource_provider = 244 std::unique_ptr<ResourceProvider> resource_provider =
245 FakeResourceProvider::Create(output_surface.get(), 245 FakeResourceProvider::Create(output_surface.get(),
246 shared_bitmap_manager.get()); 246 shared_bitmap_manager.get());
247 247
248 FakePictureLayerTilingClient client(resource_provider.get()); 248 FakePictureLayerTilingClient client(resource_provider.get());
249 client.SetTileSize(gfx::Size(256, 256)); 249 client.SetTileSize(gfx::Size(256, 256));
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 979
980 // This will invalidate tilings. 980 // This will invalidate tilings.
981 tiling_set->UpdateRasterSourceDueToLCDChange(raster_source, Region()); 981 tiling_set->UpdateRasterSourceDueToLCDChange(raster_source, Region());
982 982
983 EXPECT_TRUE( 983 EXPECT_TRUE(
984 tiling_set->UpdateTilePriorities(viewport, 1.f, time, Occlusion(), true)); 984 tiling_set->UpdateTilePriorities(viewport, 1.f, time, Occlusion(), true));
985 } 985 }
986 986
987 } // namespace 987 } // namespace
988 } // namespace cc 988 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_layer_tree_host_base.cc ('k') | cc/tiles/tile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698