Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
graphite
task
ComputeTask.h
Go to the documentation of this file.
1
/*
2
* Copyright 2022 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_ComputeTask_DEFINED
9
#define skgpu_graphite_task_ComputeTask_DEFINED
10
11
#include "
include/private/base/SkTArray.h
"
12
#include "
src/gpu/graphite/task/Task.h
"
13
#include "
src/gpu/graphite/task/TaskList.h
"
14
15
#include <memory>
16
17
namespace
skgpu::graphite
{
18
19
class
DispatchGroup;
20
21
/**
22
* ComputeTask handles preparing and recording DispatchGroups into a series of compute dispatches
23
* within a command buffer. It is guaranteed that dispatches within a DispatchGroup will be executed
24
* sequentially.
25
*/
26
class
ComputeTask
final :
public
Task
{
27
public
:
28
using
DispatchGroupList
=
skia_private::STArray<1, std::unique_ptr<DispatchGroup>
>;
29
30
static
sk_sp<ComputeTask>
Make
(
DispatchGroupList
dispatchGroups);
31
32
~ComputeTask
()
override
;
33
34
Status
prepareResources
(
ResourceProvider
*,
35
ScratchResourceManager
*,
36
const
RuntimeEffectDictionary
*)
override
;
37
Status
addCommands
(
Context
*,
CommandBuffer
*,
ReplayTargetData
)
override
;
38
39
private
:
40
explicit
ComputeTask
(
DispatchGroupList
dispatchGroups);
41
42
DispatchGroupList
fDispatchGroups;
43
44
// Every element of this list is a task that must execute before the DispatchGroup stored at the
45
// same array index. Child tasks are allowed to be a nullptr to represent NOP (i.e. the
46
// corresponding DispatchGroup doesn't have any pre-tasks).
47
skia_private::TArray<sk_sp<Task>
> fChildTasks;
48
};
49
50
}
// namespace skgpu::graphite
51
52
#endif
// skgpu_graphite_task_ComputeTask_DEFINED
SkTArray.h
TaskList.h
Task.h
sk_sp
Definition:
SkRefCnt.h:220
skgpu::graphite::CommandBuffer
Definition:
CommandBuffer.h:38
skgpu::graphite::ComputeTask
Definition:
ComputeTask.h:26
skgpu::graphite::ComputeTask::addCommands
Status addCommands(Context *, CommandBuffer *, ReplayTargetData) override
Definition:
ComputeTask.cpp:52
skgpu::graphite::ComputeTask::prepareResources
Status prepareResources(ResourceProvider *, ScratchResourceManager *, const RuntimeEffectDictionary *) override
Definition:
ComputeTask.cpp:30
skgpu::graphite::ComputeTask::Make
static sk_sp< ComputeTask > Make(DispatchGroupList dispatchGroups)
Definition:
ComputeTask.cpp:17
skgpu::graphite::ComputeTask::~ComputeTask
~ComputeTask() override
skgpu::graphite::Context
Definition:
Context.h:43
skgpu::graphite::ResourceProvider
Definition:
ResourceProvider.h:50
skgpu::graphite::RuntimeEffectDictionary
Definition:
RuntimeEffectDictionary.h:22
skgpu::graphite::ScratchResourceManager
Definition:
ScratchResourceManager.h:75
skgpu::graphite::Task
Definition:
Task.h:23
skgpu::graphite::Task::Status
Status
Definition:
Task.h:31
skia_private::STArray< 1, std::unique_ptr< DispatchGroup > >
skia_private::TArray
Definition:
SkTArray.h:40
skgpu::graphite
Definition:
BoundsManagerBench.cpp:27
skgpu::graphite::Task::ReplayTargetData
Definition:
Task.h:26
Generated on Sun Jun 23 2024 21:56:28 for Flutter Engine by
1.9.4