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 10namespace skgpu { 11 12TaskGraph::TaskGraph() {} 13TaskGraph::~TaskGraph() {} 14 15void TaskGraph::add(sk_sp<Task> task) { 16 fTasks.emplace_back(std::move(task)); 17} 18 19void TaskGraph::addCommands(ResourceProvider* resourceProvider, CommandBuffer* commandBuffer) { 20 for (const auto& task: fTasks) { 21 task->addCommands(resourceProvider, commandBuffer); 22 } 23} 24 25void TaskGraph::reset() { 26 fTasks.clear(); 27} 28 29} // namespace skgpu 30