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/raster/tile_task_worker_pool.h" | 5 #include "cc/raster/tile_task_worker_pool.h" |
6 | 6 |
7 #include "base/test/test_simple_task_runner.h" | 7 #include "base/test/test_simple_task_runner.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "cc/debug/lap_timer.h" | 9 #include "cc/debug/lap_timer.h" |
10 #include "cc/output/context_provider.h" | 10 #include "cc/output/context_provider.h" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 | 216 |
217 void BuildTileTaskGraph(TaskGraph* graph, | 217 void BuildTileTaskGraph(TaskGraph* graph, |
218 const RasterTaskVector& raster_tasks) { | 218 const RasterTaskVector& raster_tasks) { |
219 size_t priority = 0; | 219 size_t priority = 0; |
220 | 220 |
221 for (auto& raster_task : raster_tasks) { | 221 for (auto& raster_task : raster_tasks) { |
222 priority++; | 222 priority++; |
223 | 223 |
224 for (auto& decode_task : raster_task->dependencies()) { | 224 for (auto& decode_task : raster_task->dependencies()) { |
225 graph->nodes.push_back( | 225 graph->nodes.push_back( |
226 TaskGraph::Node(decode_task.get(), priority, 0u)); | 226 TaskGraph::Node(decode_task.get(), 0u /* group */, priority, 0u)); |
227 graph->edges.push_back( | 227 graph->edges.push_back( |
228 TaskGraph::Edge(raster_task.get(), decode_task.get())); | 228 TaskGraph::Edge(raster_task.get(), decode_task.get())); |
229 } | 229 } |
230 | 230 |
231 graph->nodes.push_back(TaskGraph::Node( | 231 graph->nodes.push_back( |
232 raster_task.get(), priority, raster_task->dependencies().size())); | 232 TaskGraph::Node(raster_task.get(), 0u /* group */, priority, |
| 233 raster_task->dependencies().size())); |
233 } | 234 } |
234 } | 235 } |
235 | 236 |
236 protected: | 237 protected: |
237 scoped_refptr<ContextProvider> context_provider_; | 238 scoped_refptr<ContextProvider> context_provider_; |
238 FakeOutputSurfaceClient output_surface_client_; | 239 FakeOutputSurfaceClient output_surface_client_; |
239 scoped_ptr<FakeOutputSurface> output_surface_; | 240 scoped_ptr<FakeOutputSurface> output_surface_; |
240 scoped_ptr<ResourceProvider> resource_provider_; | 241 scoped_ptr<ResourceProvider> resource_provider_; |
241 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; | 242 scoped_refptr<base::TestSimpleTaskRunner> task_runner_; |
242 scoped_ptr<SynchronousTaskGraphRunner> task_graph_runner_; | 243 scoped_ptr<SynchronousTaskGraphRunner> task_graph_runner_; |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 RunBuildTileTaskGraphTest("1_0", 1, 0); | 489 RunBuildTileTaskGraphTest("1_0", 1, 0); |
489 RunBuildTileTaskGraphTest("32_0", 32, 0); | 490 RunBuildTileTaskGraphTest("32_0", 32, 0); |
490 RunBuildTileTaskGraphTest("1_1", 1, 1); | 491 RunBuildTileTaskGraphTest("1_1", 1, 1); |
491 RunBuildTileTaskGraphTest("32_1", 32, 1); | 492 RunBuildTileTaskGraphTest("32_1", 32, 1); |
492 RunBuildTileTaskGraphTest("1_4", 1, 4); | 493 RunBuildTileTaskGraphTest("1_4", 1, 4); |
493 RunBuildTileTaskGraphTest("32_4", 32, 4); | 494 RunBuildTileTaskGraphTest("32_4", 32, 4); |
494 } | 495 } |
495 | 496 |
496 } // namespace | 497 } // namespace |
497 } // namespace cc | 498 } // namespace cc |
OLD | NEW |