Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
gpu
graphite
task
TaskList.h
Go to the documentation of this file.
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_graphite_task_TaskList_DEFINED
9
#define skgpu_graphite_task_TaskList_DEFINED
10
11
#include "
include/private/base/SkTArray.h
"
12
#include "
src/gpu/graphite/task/Task.h
"
13
14
namespace
skgpu::graphite
{
15
16
class
CommandBuffer;
17
class
Context
;
18
class
ResourceProvider
;
19
20
class
TaskList
{
21
public
:
22
TaskList
() =
default
;
23
24
void
add
(
TaskList
&& tasks) { fTasks.move_back(tasks.fTasks); }
25
void
add
(
sk_sp<Task>
task) { fTasks.emplace_back(std::move(task)); }
26
void
reset
() { fTasks.clear(); }
27
28
int
size
()
const
{
return
fTasks.size(); }
29
bool
hasTasks
()
const
{
return
!fTasks.empty(); }
30
31
// Returns kSuccess if no child task failed and at least one child didn't return kDiscard.
32
// Returns kDiscard if all children were discarded.
33
// Returns kFail if any child failed.
34
// Automatically removes tasks from its list if they return kDiscard.
35
Task::Status
prepareResources
(
ResourceProvider
*,
const
RuntimeEffectDictionary
*);
36
Task::Status
addCommands
(
Context
*,
CommandBuffer
*,
Task::ReplayTargetData
);
37
38
private
:
39
template
<
typename
Fn>
// (Task*)->Status
40
Task::Status
visitTasks(Fn);
41
42
skia_private::TArray<sk_sp<Task>
> fTasks;
43
};
44
45
}
// namespace skgpu::graphite
46
47
#endif
// skgpu_graphite_task_TaskList_DEFINED
SkTArray.h
Task.h
sk_sp
Definition
SkRefCnt.h:220
skgpu::graphite::CommandBuffer
Definition
CommandBuffer.h:38
skgpu::graphite::Context
Definition
Context.h:43
skgpu::graphite::ResourceProvider
Definition
ResourceProvider.h:50
skgpu::graphite::RuntimeEffectDictionary
Definition
RuntimeEffectDictionary.h:22
skgpu::graphite::TaskList
Definition
TaskList.h:20
skgpu::graphite::TaskList::add
void add(sk_sp< Task > task)
Definition
TaskList.h:25
skgpu::graphite::TaskList::addCommands
Task::Status addCommands(Context *, CommandBuffer *, Task::ReplayTargetData)
Definition
TaskList.cpp:44
skgpu::graphite::TaskList::hasTasks
bool hasTasks() const
Definition
TaskList.h:29
skgpu::graphite::TaskList::prepareResources
Task::Status prepareResources(ResourceProvider *, const RuntimeEffectDictionary *)
Definition
TaskList.cpp:36
skgpu::graphite::TaskList::size
int size() const
Definition
TaskList.h:28
skgpu::graphite::TaskList::add
void add(TaskList &&tasks)
Definition
TaskList.h:24
skgpu::graphite::TaskList::TaskList
TaskList()=default
skgpu::graphite::TaskList::reset
void reset()
Definition
TaskList.h:26
skgpu::graphite::Task::Status
Status
Definition
Task.h:30
skia_private::TArray
Definition
SkTArray.h:40
skresources::ResourceProvider
Definition
SkResources.h:150
skgpu::graphite
Definition
BoundsManagerBench.cpp:27
Context
Definition
SerialProcsTest.cpp:126
skgpu::graphite::Task::ReplayTargetData
Definition
Task.h:25
Generated on Fri Apr 26 2024 06:17:20 for Flutter Engine by
1.9.8