Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
skgpu::graphite::DawnQueueManager Class Reference

#include <DawnQueueManager.h>

Inheritance diagram for skgpu::graphite::DawnQueueManager:
skgpu::graphite::QueueManager

Public Member Functions

 DawnQueueManager (wgpu::Queue, const SharedContext *)
 
 ~DawnQueueManager () override
 
const wgpu::Queue & dawnQueue () const
 
void tick () const override
 
- Public Member Functions inherited from skgpu::graphite::QueueManager
virtual ~QueueManager ()
 
bool addRecording (const InsertRecordingInfo &, Context *)
 
bool addTask (Task *, Context *)
 
bool addFinishInfo (const InsertFinishInfo &, ResourceProvider *, SkSpan< const sk_sp< Buffer > > buffersToAsyncMap={})
 
bool submitToGpu ()
 
bool hasUnfinishedGpuWork ()
 
void checkForFinishedWork (SyncToCpu)
 
void returnCommandBuffer (std::unique_ptr< CommandBuffer >)
 
void addUploadBufferManagerRefs (UploadBufferManager *)
 

Private Member Functions

std::unique_ptr< CommandBuffergetNewCommandBuffer (ResourceProvider *) override
 
OutstandingSubmission onSubmitToGpu () override
 

Additional Inherited Members

- Protected Types inherited from skgpu::graphite::QueueManager
using OutstandingSubmission = std::unique_ptr< GpuWorkSubmission >
 
- Protected Member Functions inherited from skgpu::graphite::QueueManager
 QueueManager (const SharedContext *sharedContext)
 
- Protected Attributes inherited from skgpu::graphite::QueueManager
const SharedContextfSharedContext
 
std::unique_ptr< CommandBufferfCurrentCommandBuffer
 

Detailed Description

Definition at line 20 of file DawnQueueManager.h.

Constructor & Destructor Documentation

◆ DawnQueueManager()

skgpu::graphite::DawnQueueManager::DawnQueueManager ( wgpu::Queue  queue,
const SharedContext sharedContext 
)

Definition at line 116 of file DawnQueueManager.cpp.

117 : QueueManager(sharedContext), fQueue(std::move(queue)) {}
QueueManager(const SharedContext *sharedContext)

◆ ~DawnQueueManager()

skgpu::graphite::DawnQueueManager::~DawnQueueManager ( )
inlineoverride

Definition at line 23 of file DawnQueueManager.h.

23{}

Member Function Documentation

◆ dawnQueue()

const wgpu::Queue & skgpu::graphite::DawnQueueManager::dawnQueue ( ) const
inline

Definition at line 25 of file DawnQueueManager.h.

25{ return fQueue; }

◆ getNewCommandBuffer()

std::unique_ptr< CommandBuffer > skgpu::graphite::DawnQueueManager::getNewCommandBuffer ( ResourceProvider resourceProvider)
overrideprivatevirtual

Implements skgpu::graphite::QueueManager.

Definition at line 125 of file DawnQueueManager.cpp.

126 {
127 return DawnCommandBuffer::Make(dawnSharedContext(),
128 static_cast<DawnResourceProvider*>(resourceProvider));
129}
static std::unique_ptr< DawnCommandBuffer > Make(const DawnSharedContext *, DawnResourceProvider *)

◆ onSubmitToGpu()

QueueManager::OutstandingSubmission skgpu::graphite::DawnQueueManager::onSubmitToGpu ( )
overrideprivatevirtual

Implements skgpu::graphite::QueueManager.

Definition at line 131 of file DawnQueueManager.cpp.

131 {
133 DawnCommandBuffer* dawnCmdBuffer = static_cast<DawnCommandBuffer*>(fCurrentCommandBuffer.get());
134 auto wgpuCmdBuffer = dawnCmdBuffer->finishEncoding();
135 if (!wgpuCmdBuffer) {
136 fCurrentCommandBuffer->callFinishedProcs(/*success=*/false);
137 return nullptr;
138 }
139
140 fQueue.Submit(/*commandCount=*/1, &wgpuCmdBuffer);
141
142#if defined(__EMSCRIPTEN__)
143 return std::make_unique<DawnWorkSubmissionWithAsyncWait>(
144 std::move(fCurrentCommandBuffer), this, dawnSharedContext());
145#else
146 return std::make_unique<DawnWorkSubmissionWithFuture>(std::move(fCurrentCommandBuffer), this);
147#endif
148}
#define SkASSERT(cond)
Definition SkAssert.h:116
std::unique_ptr< CommandBuffer > fCurrentCommandBuffer

◆ tick()

void skgpu::graphite::DawnQueueManager::tick ( ) const
overridevirtual

Reimplemented from skgpu::graphite::QueueManager.

Definition at line 119 of file DawnQueueManager.cpp.

119{ this->dawnSharedContext()->tick(); }

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