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

Unified Diff: cc/resources/tile_manager_perftest.cc

Issue 863013004: cc: Split RasterTilePriorityQueue into required and all based on type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile fix Created 5 years, 11 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager_perftest.cc
diff --git a/cc/resources/tile_manager_perftest.cc b/cc/resources/tile_manager_perftest.cc
index 911e5c9b34f4362cfecb048faf8a23bee008c2a7..14b1d18d2b22128bea966b8e212351af7c54a421 100644
--- a/cc/resources/tile_manager_perftest.cc
+++ b/cc/resources/tile_manager_perftest.cc
@@ -180,9 +180,8 @@ class TileManagerPerfTest : public testing::Test {
timer_.Reset();
do {
- RasterTilePriorityQueue queue;
- host_impl_.BuildRasterQueue(&queue, priorities[priority_count],
- RasterTilePriorityQueue::Type::ALL);
+ scoped_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
+ priorities[priority_count], RasterTilePriorityQueue::Type::ALL));
priority_count = (priority_count + 1) % arraysize(priorities);
timer_.NextLap();
} while (!timer_.HasTimeLimitExpired());
@@ -211,13 +210,12 @@ class TileManagerPerfTest : public testing::Test {
timer_.Reset();
do {
int count = tile_count;
- RasterTilePriorityQueue queue;
- host_impl_.BuildRasterQueue(&queue, priorities[priority_count],
- RasterTilePriorityQueue::Type::ALL);
+ scoped_ptr<RasterTilePriorityQueue> queue(host_impl_.BuildRasterQueue(
+ priorities[priority_count], RasterTilePriorityQueue::Type::ALL));
while (count--) {
- ASSERT_FALSE(queue.IsEmpty());
- ASSERT_TRUE(queue.Top() != NULL);
- queue.Pop();
+ ASSERT_FALSE(queue->IsEmpty());
+ ASSERT_TRUE(queue->Top() != NULL);
+ queue->Pop();
}
priority_count = (priority_count + 1) % arraysize(priorities);
timer_.NextLap();
« 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