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

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

Issue 869433003: (not for commit) Simplified multi-threaded Ganesh with lock on Flush only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 10 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
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/resources/picture_layer_tiling_set.h" 5 #include "cc/resources/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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 float scale_increment, 207 float scale_increment,
208 float ideal_contents_scale, 208 float ideal_contents_scale,
209 float expected_scale) { 209 float expected_scale) {
210 FakeOutputSurfaceClient output_surface_client; 210 FakeOutputSurfaceClient output_surface_client;
211 scoped_ptr<FakeOutputSurface> output_surface = 211 scoped_ptr<FakeOutputSurface> output_surface =
212 FakeOutputSurface::Create3d(); 212 FakeOutputSurface::Create3d();
213 CHECK(output_surface->BindToClient(&output_surface_client)); 213 CHECK(output_surface->BindToClient(&output_surface_client));
214 214
215 scoped_ptr<SharedBitmapManager> shared_bitmap_manager( 215 scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
216 new TestSharedBitmapManager()); 216 new TestSharedBitmapManager());
217 scoped_ptr<ResourceProvider> resource_provider = 217 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create(
218 ResourceProvider::Create(output_surface.get(), 218 output_surface.get(), shared_bitmap_manager.get(), NULL, NULL, 0, false,
219 shared_bitmap_manager.get(), 219 false, 1);
220 NULL,
221 NULL,
222 0,
223 false,
224 1);
225 220
226 FakePictureLayerTilingClient client(resource_provider.get()); 221 FakePictureLayerTilingClient client(resource_provider.get());
227 client.SetTileSize(gfx::Size(256, 256)); 222 client.SetTileSize(gfx::Size(256, 256));
228 client.set_tree(PENDING_TREE); 223 client.set_tree(PENDING_TREE);
229 gfx::Size layer_bounds(1000, 800); 224 gfx::Size layer_bounds(1000, 800);
230 scoped_ptr<PictureLayerTilingSet> set = CreateTilingSet(&client); 225 scoped_ptr<PictureLayerTilingSet> set = CreateTilingSet(&client);
231 scoped_refptr<FakePicturePileImpl> pile = 226 scoped_refptr<FakePicturePileImpl> pile =
232 FakePicturePileImpl::CreateFilledPileWithDefaultTileSize(layer_bounds); 227 FakePicturePileImpl::CreateFilledPileWithDefaultTileSize(layer_bounds);
233 228
234 float scale = min_scale; 229 float scale = min_scale;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 441
447 // Clone from the pending to the active tree with the same max content size. 442 // Clone from the pending to the active tree with the same max content size.
448 active_set->UpdateTilingsToCurrentRasterSource( 443 active_set->UpdateTilingsToCurrentRasterSource(
449 pile.get(), pending_set.get(), Region(), 1.f, max_content_scale); 444 pile.get(), pending_set.get(), Region(), 1.f, max_content_scale);
450 // All the tilings are on the active tree. 445 // All the tilings are on the active tree.
451 EXPECT_EQ(2u, active_set->num_tilings()); 446 EXPECT_EQ(2u, active_set->num_tilings());
452 } 447 }
453 448
454 } // namespace 449 } // namespace
455 } // namespace cc 450 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling_perftest.cc ('k') | cc/resources/prioritized_resource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698