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

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

Issue 1130123003: cc: Separate the priority from the tile and put in new PrioritizedTile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 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.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/location.h" 5 #include "base/location.h"
6 #include "base/thread_task_runner_handle.h" 6 #include "base/thread_task_runner_handle.h"
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "cc/debug/lap_timer.h" 8 #include "cc/debug/lap_timer.h"
9 #include "cc/resources/raster_buffer.h" 9 #include "cc/resources/raster_buffer.h"
10 #include "cc/resources/tile.h" 10 #include "cc/resources/tile.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 layer->UpdateTiles(resourceless_software_draw); 214 layer->UpdateTiles(resourceless_software_draw);
215 215
216 int priority_count = 0; 216 int priority_count = 0;
217 timer_.Reset(); 217 timer_.Reset();
218 do { 218 do {
219 int count = tile_count; 219 int count = tile_count;
220 scoped_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue( 220 scoped_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
221 priorities[priority_count], RasterTilePriorityQueue::Type::ALL)); 221 priorities[priority_count], RasterTilePriorityQueue::Type::ALL));
222 while (count--) { 222 while (count--) {
223 ASSERT_FALSE(queue->IsEmpty()); 223 ASSERT_FALSE(queue->IsEmpty());
224 ASSERT_TRUE(queue->Top() != NULL); 224 ASSERT_TRUE(queue->Top().tile());
225 queue->Pop(); 225 queue->Pop();
226 } 226 }
227 priority_count = (priority_count + 1) % arraysize(priorities); 227 priority_count = (priority_count + 1) % arraysize(priorities);
228 timer_.NextLap(); 228 timer_.NextLap();
229 } while (!timer_.HasTimeLimitExpired()); 229 } while (!timer_.HasTimeLimitExpired());
230 230
231 perf_test::PrintResult( 231 perf_test::PrintResult(
232 "tile_manager_raster_tile_queue_construct_and_iterate", 232 "tile_manager_raster_tile_queue_construct_and_iterate",
233 "", 233 "",
234 test_name, 234 test_name,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 } 289 }
290 } 290 }
291 291
292 timer_.Reset(); 292 timer_.Reset();
293 do { 293 do {
294 int count = tile_count; 294 int count = tile_count;
295 scoped_ptr<EvictionTilePriorityQueue> queue( 295 scoped_ptr<EvictionTilePriorityQueue> queue(
296 host_impl_.BuildEvictionQueue(priorities[priority_count])); 296 host_impl_.BuildEvictionQueue(priorities[priority_count]));
297 while (count--) { 297 while (count--) {
298 ASSERT_FALSE(queue->IsEmpty()); 298 ASSERT_FALSE(queue->IsEmpty());
299 ASSERT_TRUE(queue->Top() != NULL); 299 ASSERT_TRUE(queue->Top().tile());
300 queue->Pop(); 300 queue->Pop();
301 } 301 }
302 priority_count = (priority_count + 1) % arraysize(priorities); 302 priority_count = (priority_count + 1) % arraysize(priorities);
303 timer_.NextLap(); 303 timer_.NextLap();
304 } while (!timer_.HasTimeLimitExpired()); 304 } while (!timer_.HasTimeLimitExpired());
305 305
306 perf_test::PrintResult( 306 perf_test::PrintResult(
307 "tile_manager_eviction_tile_queue_construct_and_iterate", 307 "tile_manager_eviction_tile_queue_construct_and_iterate",
308 "", 308 "",
309 test_name, 309 test_name,
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); 476 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64);
477 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); 477 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128);
478 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); 478 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16);
479 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); 479 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32);
480 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); 480 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64);
481 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); 481 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128);
482 } 482 }
483 483
484 } // namespace 484 } // namespace
485 } // namespace cc 485 } // 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