• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2021 Google LLC
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #include "experimental/graphite/src/TaskGraph.h"
9 
10 namespace skgpu {
11 
TaskGraph()12 TaskGraph::TaskGraph() {}
~TaskGraph()13 TaskGraph::~TaskGraph() {}
14 
add(sk_sp<Task> task)15 void TaskGraph::add(sk_sp<Task> task) {
16     fTasks.emplace_back(std::move(task));
17 }
18 
addCommands(ResourceProvider * resourceProvider,CommandBuffer * commandBuffer)19 void TaskGraph::addCommands(ResourceProvider* resourceProvider, CommandBuffer* commandBuffer) {
20     for (const auto& task: fTasks) {
21         task->addCommands(resourceProvider, commandBuffer);
22     }
23 }
24 
reset()25 void TaskGraph::reset() {
26     fTasks.clear();
27 }
28 
29 } // namespace skgpu
30