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

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: reset priority on correct tree. 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
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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // will be creating one high res and one low res tiling. That is, 210 // will be creating one high res and one low res tiling. That is,
211 // width and height should be smaller by sqrt(1 + low_res_scale). 211 // width and height should be smaller by sqrt(1 + low_res_scale).
212 // This gives us _approximately_ correct counts. 212 // This gives us _approximately_ correct counts.
213 width *= settings_.default_tile_size.width() / 213 width *= settings_.default_tile_size.width() /
214 std::sqrt(1 + settings_.low_res_contents_scale_factor); 214 std::sqrt(1 + settings_.low_res_contents_scale_factor);
215 height *= settings_.default_tile_size.height() / 215 height *= settings_.default_tile_size.height() /
216 std::sqrt(1 + settings_.low_res_contents_scale_factor); 216 std::sqrt(1 + settings_.low_res_contents_scale_factor);
217 217
218 // Ensure that we start with blank trees and no tiles. 218 // Ensure that we start with blank trees and no tiles.
219 host_impl_.ResetTreesForTesting(); 219 host_impl_.ResetTreesForTesting();
220 tile_manager()->CleanUpReleasedTilesForTesting(); 220 tile_manager()->FreeResourcesAndCleanUpReleasedTilesForTesting();
221 221
222 gfx::Size layer_bounds(width, height); 222 gfx::Size layer_bounds(width, height);
223 gfx::Size viewport(width / 5, height / 5); 223 gfx::Size viewport(width / 5, height / 5);
224 host_impl_.SetViewportSize(viewport); 224 host_impl_.SetViewportSize(viewport);
225 SetupDefaultTreesWithFixedTileSize(layer_bounds, 225 SetupDefaultTreesWithFixedTileSize(layer_bounds,
226 settings_.default_tile_size); 226 settings_.default_tile_size);
227 227
228 active_root_layer_->CreateDefaultTilingsAndTiles(); 228 active_root_layer_->CreateDefaultTilingsAndTiles();
229 pending_root_layer_->CreateDefaultTilingsAndTiles(); 229 pending_root_layer_->CreateDefaultTilingsAndTiles();
230 230
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 RunRasterIteratorTest("2_16", 16); 331 RunRasterIteratorTest("2_16", 16);
332 RunRasterIteratorTest("2_32", 32); 332 RunRasterIteratorTest("2_32", 32);
333 RunRasterIteratorTest("2_64", 64); 333 RunRasterIteratorTest("2_64", 64);
334 RunRasterIteratorTest("2_128", 128); 334 RunRasterIteratorTest("2_128", 128);
335 } 335 }
336 336
337 } // namespace 337 } // namespace
338 338
339 } // namespace cc 339 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698