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 #ifndef skgpu_TaskGraph_DEFINED
9 #define skgpu_TaskGraph_DEFINED
10 
11 #include <vector>
12 #include "experimental/graphite/src/Task.h"
13 
14 namespace skgpu {
15 class CommandBuffer;
16 class ResourceProvider;
17 
18 class TaskGraph {
19 public:
20     TaskGraph();
21     ~TaskGraph();
22 
23     void add(sk_sp<Task>);
24     void addCommands(ResourceProvider*, CommandBuffer*);
25     void reset();
26 
27 protected:
28 private:
29     std::vector<sk_sp<Task>> fTasks;
30 };
31 
32 } // namespace skgpu
33 
34 #endif // skgpu_TaskGraph_DEFINED
35