Flutter Engine
The Flutter Engine
Classes | Public Types | Public Member Functions | List of all members
skgpu::graphite::Task Class Referenceabstract

#include <Task.h>

Inheritance diagram for skgpu::graphite::Task:
SkRefCnt SkRefCntBase skgpu::graphite::ClearBuffersTask skgpu::graphite::ComputeTask skgpu::graphite::CopyBufferToBufferTask skgpu::graphite::CopyTextureToBufferTask skgpu::graphite::CopyTextureToTextureTask skgpu::graphite::DrawTask skgpu::graphite::RenderPassTask skgpu::graphite::SynchronizeToCpuTask skgpu::graphite::UploadTask

Classes

struct  ReplayTargetData
 

Public Types

enum class  Status { kSuccess , kDiscard , kFail }
 

Public Member Functions

virtual Status prepareResources (ResourceProvider *, ScratchResourceManager *, const RuntimeEffectDictionary *)=0
 
virtual Status addCommands (Context *, CommandBuffer *, ReplayTargetData)=0
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Detailed Description

Definition at line 23 of file Task.h.

Member Enumeration Documentation

◆ Status

enum class skgpu::graphite::Task::Status
strong
Enumerator
kSuccess 
kDiscard 
kFail 

Definition at line 31 of file Task.h.

31 {
32 // The task step (prepareResources or addCommands) succeeded, proceed to the next task.
33 // If the Recording is replayed, this task should be executed again.
35 // The task step succeeded, but it was a one-time-only operation and should be removed from
36 // the task list. If this is returned from prepareResources(), the task is removed before
37 // addCommands() will ever be called. If this is returned from addCommands(), it will not
38 // be part of any replayed Recording, but any added commands from the first call will be
39 // executed once.
40 //
41 // NOTE: If a task step needs to be conditionally processed but repeatable, it should
42 // internally skip work and still return kSuccess instead of kDiscard.
44 // The step failed and cannot be recovered so the Recording is invalidated.
45 kFail
46 };
@ kSuccess
Definition: embedder.h:73

Member Function Documentation

◆ addCommands()

virtual Status skgpu::graphite::Task::addCommands ( Context ,
CommandBuffer ,
ReplayTargetData   
)
pure virtual

◆ prepareResources()

virtual Status skgpu::graphite::Task::prepareResources ( ResourceProvider ,
ScratchResourceManager ,
const RuntimeEffectDictionary  
)
pure virtual

The documentation for this class was generated from the following file: