Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
gpu
graphite
task
DrawTask.h
Go to the documentation of this file.
1
/*
2
* Copyright 2024 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_DrawTask_DEFINED
9
#define skgpu_graphite_task_DrawTask_DEFINED
10
11
#include "
src/gpu/graphite/task/Task.h
"
12
#include "
src/gpu/graphite/task/TaskList.h
"
13
14
namespace
skgpu::graphite
{
15
16
class
TextureProxy;
17
18
/**
19
* DrawTask is a collection of subtasks that are executed in order to produce some intended
20
* image in the DrawTask's target. As such, at least one of its subtasks will either be a
21
* RenderPassTask, ComputeTask or CopyXToTextureTask that directly modify the target.
22
*/
23
class
DrawTask
final :
public
Task
{
24
public
:
25
explicit
DrawTask
(
sk_sp<TextureProxy>
target
);
26
~DrawTask
()
override
;
27
28
Status
prepareResources
(
ResourceProvider
*,
const
RuntimeEffectDictionary
*)
override
;
29
30
Status
addCommands
(
Context
*,
CommandBuffer
*,
ReplayTargetData
)
override
;
31
32
private
:
33
friend
class
DrawContext
;
// for "addTask"
34
35
// DrawTask is modified directly by DrawContext for efficiency, but its task list will be
36
// fixed once DrawContext snaps the task.
37
void
addTask(
sk_sp<Task>
task) { fChildTasks.
add
(std::move(task)); }
38
bool
hasTasks()
const
{
return
fChildTasks.
hasTasks
(); }
39
40
sk_sp<TextureProxy>
fTarget;
41
TaskList fChildTasks;
42
};
43
44
}
// namespace skgpu::graphite
45
46
#endif
// skgpu_graphite_task_DrawTask_DEFINED
TaskList.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::DrawContext
Definition
DrawContext.h:44
skgpu::graphite::DrawTask
Definition
DrawTask.h:23
skgpu::graphite::DrawTask::~DrawTask
~DrawTask() override
skgpu::graphite::DrawTask::prepareResources
Status prepareResources(ResourceProvider *, const RuntimeEffectDictionary *) override
Definition
DrawTask.cpp:18
skgpu::graphite::DrawTask::addCommands
Status addCommands(Context *, CommandBuffer *, ReplayTargetData) override
Definition
DrawTask.cpp:23
skgpu::graphite::ResourceProvider
Definition
ResourceProvider.h:50
skgpu::graphite::RuntimeEffectDictionary
Definition
RuntimeEffectDictionary.h:22
skgpu::graphite::TaskList::hasTasks
bool hasTasks() const
Definition
TaskList.h:29
skgpu::graphite::TaskList::add
void add(TaskList &&tasks)
Definition
TaskList.h:24
skgpu::graphite::Task
Definition
Task.h:22
skgpu::graphite::Task::Status
Status
Definition
Task.h:30
target
uint32_t * target
Definition
fl_texture_registrar_test.cc:40
skgpu::graphite
Definition
BoundsManagerBench.cpp:27
skgpu::graphite::Task::ReplayTargetData
Definition
Task.h:25
Generated on Fri Apr 26 2024 06:17:20 for Flutter Engine by
1.9.8