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/resources/raster_worker_pool.h" | 5 #include "cc/resources/raster_worker_pool.h" |
6 | 6 |
7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
8 #include "cc/test/lap_timer.h" | 8 #include "cc/test/lap_timer.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "testing/perf/perf_test.h" | 10 #include "testing/perf/perf_test.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 perf_tasks[task] = new_perf_task; | 68 perf_tasks[task] = new_perf_task; |
69 } | 69 } |
70 | 70 |
71 perf_tasks_.swap(perf_tasks); | 71 perf_tasks_.swap(perf_tasks); |
72 } | 72 } |
73 | 73 |
74 void BuildTaskGraph() { | 74 void BuildTaskGraph() { |
75 unsigned priority = 0; | 75 unsigned priority = 0; |
76 TaskGraph graph; | 76 TaskGraph graph; |
77 | 77 |
| 78 size_t raster_tasks_required_for_activation_count = 0u; |
| 79 for (RasterTaskVector::const_iterator it = raster_tasks().begin(); |
| 80 it != raster_tasks().end(); ++it) { |
| 81 if (IsRasterTaskRequiredForActivation(it->get())) |
| 82 raster_tasks_required_for_activation_count++; |
| 83 } |
| 84 |
78 scoped_refptr<internal::WorkerPoolTask> | 85 scoped_refptr<internal::WorkerPoolTask> |
79 raster_required_for_activation_finished_task( | 86 raster_required_for_activation_finished_task( |
80 CreateRasterRequiredForActivationFinishedTask()); | 87 CreateRasterRequiredForActivationFinishedTask( |
| 88 raster_tasks_required_for_activation_count)); |
81 internal::GraphNode* raster_required_for_activation_finished_node = | 89 internal::GraphNode* raster_required_for_activation_finished_node = |
82 CreateGraphNodeForTask( | 90 CreateGraphNodeForTask( |
83 raster_required_for_activation_finished_task.get(), | 91 raster_required_for_activation_finished_task.get(), |
84 priority++, | 92 priority++, |
85 &graph); | 93 &graph); |
86 | 94 |
87 scoped_refptr<internal::WorkerPoolTask> raster_finished_task( | 95 scoped_refptr<internal::WorkerPoolTask> raster_finished_task( |
88 CreateRasterFinishedTask()); | 96 CreateRasterFinishedTask()); |
89 internal::GraphNode* raster_finished_node = | 97 internal::GraphNode* raster_finished_node = |
90 CreateGraphNodeForTask(raster_finished_task.get(), | 98 CreateGraphNodeForTask(raster_finished_task.get(), |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 RunBuildTaskGraphTest("100_4", 100, 4); | 224 RunBuildTaskGraphTest("100_4", 100, 4); |
217 RunBuildTaskGraphTest("1000_4", 1000, 4); | 225 RunBuildTaskGraphTest("1000_4", 1000, 4); |
218 RunBuildTaskGraphTest("10_16", 10, 16); | 226 RunBuildTaskGraphTest("10_16", 10, 16); |
219 RunBuildTaskGraphTest("100_16", 100, 16); | 227 RunBuildTaskGraphTest("100_16", 100, 16); |
220 RunBuildTaskGraphTest("1000_16", 1000, 16); | 228 RunBuildTaskGraphTest("1000_16", 1000, 16); |
221 } | 229 } |
222 | 230 |
223 } // namespace | 231 } // namespace |
224 | 232 |
225 } // namespace cc | 233 } // namespace cc |
OLD | NEW |