OLD | NEW |
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 "cc/debug/rasterize_and_record_benchmark_impl.h" | 5 #include "cc/debug/rasterize_and_record_benchmark_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 scoped_refptr<BenchmarkRasterTask> benchmark_raster_task( | 223 scoped_refptr<BenchmarkRasterTask> benchmark_raster_task( |
224 new BenchmarkRasterTask(picture_pile, | 224 new BenchmarkRasterTask(picture_pile, |
225 content_rect, | 225 content_rect, |
226 contents_scale, | 226 contents_scale, |
227 rasterize_repeat_count_)); | 227 rasterize_repeat_count_)); |
228 | 228 |
229 TaskGraph graph; | 229 TaskGraph graph; |
230 | 230 |
231 graph.nodes.push_back( | 231 graph.nodes.push_back( |
232 TaskGraph::Node(benchmark_raster_task, | 232 TaskGraph::Node(benchmark_raster_task.get(), |
233 RasterWorkerPool::kBenchmarkRasterTaskPriority, | 233 RasterWorkerPool::kBenchmarkRasterTaskPriority, |
234 0u)); | 234 0u)); |
235 | 235 |
236 task_graph_runner->ScheduleTasks(task_namespace_, &graph); | 236 task_graph_runner->ScheduleTasks(task_namespace_, &graph); |
237 task_graph_runner->WaitForTasksToFinishRunning(task_namespace_); | 237 task_graph_runner->WaitForTasksToFinishRunning(task_namespace_); |
238 | 238 |
239 Task::Vector completed_tasks; | 239 Task::Vector completed_tasks; |
240 task_graph_runner->CollectCompletedTasks(task_namespace_, &completed_tasks); | 240 task_graph_runner->CollectCompletedTasks(task_namespace_, &completed_tasks); |
241 DCHECK_EQ(1u, completed_tasks.size()); | 241 DCHECK_EQ(1u, completed_tasks.size()); |
242 DCHECK_EQ(completed_tasks[0], benchmark_raster_task); | 242 DCHECK_EQ(completed_tasks[0], benchmark_raster_task); |
(...skipping 19 matching lines...) Expand all Loading... |
262 pixels_rasterized_with_non_solid_color(0), | 262 pixels_rasterized_with_non_solid_color(0), |
263 pixels_rasterized_as_opaque(0), | 263 pixels_rasterized_as_opaque(0), |
264 total_layers(0), | 264 total_layers(0), |
265 total_picture_layers(0), | 265 total_picture_layers(0), |
266 total_picture_layers_with_no_content(0), | 266 total_picture_layers_with_no_content(0), |
267 total_picture_layers_off_screen(0) {} | 267 total_picture_layers_off_screen(0) {} |
268 | 268 |
269 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} | 269 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} |
270 | 270 |
271 } // namespace cc | 271 } // namespace cc |
OLD | NEW |