#include <TaskList.h>
Definition at line 21 of file TaskList.h.
◆ TaskList()
skgpu::graphite::TaskList::TaskList |
( |
| ) |
|
|
default |
◆ add() [1/2]
void skgpu::graphite::TaskList::add |
( |
sk_sp< Task > |
task | ) |
|
|
inline |
Definition at line 26 of file TaskList.h.
26{ fTasks.emplace_back(std::move(task)); }
◆ add() [2/2]
void skgpu::graphite::TaskList::add |
( |
TaskList && |
tasks | ) |
|
|
inline |
Definition at line 25 of file TaskList.h.
25{ fTasks.move_back(tasks.fTasks); }
◆ addCommands()
Definition at line 50 of file TaskList.cpp.
52 {
54 return this->visitTasks([&](
Task* task) {
55 return task->addCommands(context, commandBuffer, replayData);
56 });
57}
#define TRACE_EVENT1(category_group, name, arg1_name, arg1_val)
◆ hasTasks()
bool skgpu::graphite::TaskList::hasTasks |
( |
| ) |
const |
|
inline |
Definition at line 30 of file TaskList.h.
30{ return !fTasks.empty(); }
◆ prepareResources()
Definition at line 38 of file TaskList.cpp.
40 {
42 scratchManager->pushScope();
43 Status status = this->visitTasks([&](
Task* task) {
44 return task->prepareResources(resourceProvider, scratchManager, runtimeDict);
45 });
46 scratchManager->popScope();
47 return status;
48}
◆ reset()
void skgpu::graphite::TaskList::reset |
( |
| ) |
|
|
inline |
◆ size()
int skgpu::graphite::TaskList::size |
( |
| ) |
const |
|
inline |
Definition at line 29 of file TaskList.h.
29{ return fTasks.size(); }
◆ visitTasks()
template<typename Fn >
Status skgpu::graphite::TaskList::visitTasks |
( |
Fn |
fn | ) |
|
Definition at line 18 of file TaskList.cpp.
18 {
19 int discardCount = 0;
21 if (!task) {
22 discardCount++;
23 continue;
24 }
25
26 Status status = fn(task.get());
30 task.reset();
31 discardCount++;
32 }
33 }
34
36}
The documentation for this class was generated from the following files: