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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/test/test_simple_task_runner.h" | 10 #include "base/test/test_simple_task_runner.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 const RasterTaskVector& raster_tasks) { | 222 const RasterTaskVector& raster_tasks) { |
223 uint16_t priority = 0; | 223 uint16_t priority = 0; |
224 | 224 |
225 for (auto& raster_task : raster_tasks) { | 225 for (auto& raster_task : raster_tasks) { |
226 priority++; | 226 priority++; |
227 | 227 |
228 for (auto& decode_task : raster_task->dependencies()) { | 228 for (auto& decode_task : raster_task->dependencies()) { |
229 graph->nodes.push_back( | 229 graph->nodes.push_back( |
230 TaskGraph::Node(decode_task.get(), 0u /* group */, priority, 0u)); | 230 TaskGraph::Node(decode_task.get(), 0u /* group */, priority, 0u)); |
231 graph->edges.push_back( | 231 graph->edges.push_back( |
232 TaskGraph::Edge(raster_task.get(), decode_task.get())); | 232 TaskGraph::Edge(decode_task.get(), raster_task.get())); |
233 } | 233 } |
234 | 234 |
235 graph->nodes.push_back(TaskGraph::Node( | 235 graph->nodes.push_back(TaskGraph::Node( |
236 raster_task.get(), 0u /* group */, priority, | 236 raster_task.get(), 0u /* group */, priority, |
237 static_cast<uint32_t>(raster_task->dependencies().size()))); | 237 static_cast<uint32_t>(raster_task->dependencies().size()))); |
238 } | 238 } |
239 } | 239 } |
240 | 240 |
241 protected: | 241 protected: |
242 scoped_refptr<ContextProvider> context_provider_; | 242 scoped_refptr<ContextProvider> context_provider_; |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 RunBuildTileTaskGraphTest("1_0", 1, 0); | 486 RunBuildTileTaskGraphTest("1_0", 1, 0); |
487 RunBuildTileTaskGraphTest("32_0", 32, 0); | 487 RunBuildTileTaskGraphTest("32_0", 32, 0); |
488 RunBuildTileTaskGraphTest("1_1", 1, 1); | 488 RunBuildTileTaskGraphTest("1_1", 1, 1); |
489 RunBuildTileTaskGraphTest("32_1", 32, 1); | 489 RunBuildTileTaskGraphTest("32_1", 32, 1); |
490 RunBuildTileTaskGraphTest("1_4", 1, 4); | 490 RunBuildTileTaskGraphTest("1_4", 1, 4); |
491 RunBuildTileTaskGraphTest("32_4", 32, 4); | 491 RunBuildTileTaskGraphTest("32_4", 32, 4); |
492 } | 492 } |
493 | 493 |
494 } // namespace | 494 } // namespace |
495 } // namespace cc | 495 } // namespace cc |
OLD | NEW |