Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | List of all members
skgpu::graphite::ClearBuffersTask Class Referencefinal

#include <ClearBuffersTask.h>

Inheritance diagram for skgpu::graphite::ClearBuffersTask:
skgpu::graphite::Task SkRefCnt SkRefCntBase

Public Member Functions

 ~ClearBuffersTask () override
 
Status prepareResources (ResourceProvider *, ScratchResourceManager *, const RuntimeEffectDictionary *) override
 
Status addCommands (Context *, CommandBuffer *, ReplayTargetData) override
 
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
 

Static Public Member Functions

static sk_sp< ClearBuffersTaskMake (skia_private::TArray< ClearBufferInfo >)
 

Additional Inherited Members

- Public Types inherited from skgpu::graphite::Task
enum class  Status { kSuccess , kDiscard , kFail }
 

Detailed Description

Task that clears a region of a list of buffers to 0.

Definition at line 20 of file ClearBuffersTask.h.

Constructor & Destructor Documentation

◆ ~ClearBuffersTask()

skgpu::graphite::ClearBuffersTask::~ClearBuffersTask ( )
override

Definition at line 18 of file ClearBuffersTask.cpp.

18{};

Member Function Documentation

◆ addCommands()

Task::Status skgpu::graphite::ClearBuffersTask::addCommands ( Context ,
CommandBuffer commandBuffer,
ReplayTargetData   
)
overridevirtual

Implements skgpu::graphite::Task.

Definition at line 20 of file ClearBuffersTask.cpp.

22 {
23 bool result = true;
24 for (const auto& c : fClearList) {
25 result &= commandBuffer->clearBuffer(c.fBuffer, c.fOffset, c.fSize);
26 }
28}
GAsyncResult * result

◆ Make()

sk_sp< ClearBuffersTask > skgpu::graphite::ClearBuffersTask::Make ( skia_private::TArray< ClearBufferInfo clearList)
static

Definition at line 14 of file ClearBuffersTask.cpp.

14 {
15 return sk_sp<ClearBuffersTask>(new ClearBuffersTask(std::move(clearList)));
16}

◆ prepareResources()

Status skgpu::graphite::ClearBuffersTask::prepareResources ( ResourceProvider ,
ScratchResourceManager ,
const RuntimeEffectDictionary  
)
inlineoverridevirtual

Implements skgpu::graphite::Task.

Definition at line 25 of file ClearBuffersTask.h.

27 {
28 return Status::kSuccess;
29 }

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