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

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

Issue 366113002: cc: Do not cleanup tiles with raster tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits updated. Created 6 years, 4 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.cc ('k') | cc/resources/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 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 "base/time/time.h" 5 #include "base/time/time.h"
6 #include "cc/debug/lap_timer.h" 6 #include "cc/debug/lap_timer.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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 // will be creating one high res and one low res tiling. That is, 287 // will be creating one high res and one low res tiling. That is,
288 // width and height should be smaller by sqrt(1 + low_res_scale). 288 // width and height should be smaller by sqrt(1 + low_res_scale).
289 // This gives us _approximately_ correct counts. 289 // This gives us _approximately_ correct counts.
290 width *= settings_.default_tile_size.width() / 290 width *= settings_.default_tile_size.width() /
291 std::sqrt(1 + settings_.low_res_contents_scale_factor); 291 std::sqrt(1 + settings_.low_res_contents_scale_factor);
292 height *= settings_.default_tile_size.height() / 292 height *= settings_.default_tile_size.height() /
293 std::sqrt(1 + settings_.low_res_contents_scale_factor); 293 std::sqrt(1 + settings_.low_res_contents_scale_factor);
294 294
295 // Ensure that we start with blank trees and no tiles. 295 // Ensure that we start with blank trees and no tiles.
296 host_impl_.ResetTreesForTesting(); 296 host_impl_.ResetTreesForTesting();
297 tile_manager()->CleanUpReleasedTilesForTesting(); 297 tile_manager()->FreeResourcesAndCleanUpReleasedTilesForTesting();
298 298
299 gfx::Size layer_bounds(width, height); 299 gfx::Size layer_bounds(width, height);
300 gfx::Size viewport(width / 5, height / 5); 300 gfx::Size viewport(width / 5, height / 5);
301 host_impl_.SetViewportSize(viewport); 301 host_impl_.SetViewportSize(viewport);
302 SetupDefaultTreesWithFixedTileSize(layer_bounds, 302 SetupDefaultTreesWithFixedTileSize(layer_bounds,
303 settings_.default_tile_size); 303 settings_.default_tile_size);
304 304
305 active_root_layer_->CreateDefaultTilingsAndTiles(); 305 active_root_layer_->CreateDefaultTilingsAndTiles();
306 pending_root_layer_->CreateDefaultTilingsAndTiles(); 306 pending_root_layer_->CreateDefaultTilingsAndTiles();
307 307
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 490
491 RunEvictionQueueConstructAndIterateTest("2_16", 16); 491 RunEvictionQueueConstructAndIterateTest("2_16", 16);
492 RunEvictionQueueConstructAndIterateTest("2_32", 32); 492 RunEvictionQueueConstructAndIterateTest("2_32", 32);
493 RunEvictionQueueConstructAndIterateTest("2_64", 64); 493 RunEvictionQueueConstructAndIterateTest("2_64", 64);
494 RunEvictionQueueConstructAndIterateTest("2_128", 128); 494 RunEvictionQueueConstructAndIterateTest("2_128", 128);
495 } 495 }
496 496
497 } // namespace 497 } // namespace
498 498
499 } // namespace cc 499 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager.cc ('k') | cc/resources/tile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698