Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Static Public Member Functions | List of all members
skgpu::graphite::DawnCommandBuffer Class Referencefinal

#include <DawnCommandBuffer.h>

Inheritance diagram for skgpu::graphite::DawnCommandBuffer:
skgpu::graphite::CommandBuffer

Public Member Functions

 ~DawnCommandBuffer () override
 
wgpu::CommandBuffer finishEncoding ()
 
- Public Member Functions inherited from skgpu::graphite::CommandBuffer
virtual ~CommandBuffer ()
 
void trackResource (sk_sp< Resource > resource)
 
void trackCommandBufferResource (sk_sp< Resource > resource)
 
void resetCommandBuffer ()
 
virtual bool setNewCommandBufferResources ()=0
 
void addFinishedProc (sk_sp< RefCntedCallback > finishedProc)
 
void callFinishedProcs (bool success)
 
virtual void addWaitSemaphores (size_t numWaitSemaphores, const BackendSemaphore *waitSemaphores)
 
virtual void addSignalSemaphores (size_t numWaitSemaphores, const BackendSemaphore *signalSemaphores)
 
virtual void prepareSurfaceForStateUpdate (SkSurface *targetSurface, const MutableTextureState *newState)
 
void addBuffersToAsyncMapOnSubmit (SkSpan< const sk_sp< Buffer > >)
 
SkSpan< const sk_sp< Buffer > > buffersToAsyncMapOnSubmit () const
 
bool addRenderPass (const RenderPassDesc &, sk_sp< Texture > colorTexture, sk_sp< Texture > resolveTexture, sk_sp< Texture > depthStencilTexture, SkRect viewport, const DrawPassList &drawPasses)
 
bool addComputePass (DispatchGroupSpan dispatchGroups)
 
bool copyBufferToBuffer (const Buffer *srcBuffer, size_t srcOffset, sk_sp< Buffer > dstBuffer, size_t dstOffset, size_t size)
 
bool copyTextureToBuffer (sk_sp< Texture >, SkIRect srcRect, sk_sp< Buffer >, size_t bufferOffset, size_t bufferRowBytes)
 
bool copyBufferToTexture (const Buffer *, sk_sp< Texture >, const BufferTextureCopyData *, int count)
 
bool copyTextureToTexture (sk_sp< Texture > src, SkIRect srcRect, sk_sp< Texture > dst, SkIPoint dstPoint, int mipLevel)
 
bool synchronizeBufferToCpu (sk_sp< Buffer >)
 
bool clearBuffer (const Buffer *buffer, size_t offset, size_t size)
 
void setReplayTranslation (SkIVector translation)
 
void clearReplayTranslation ()
 

Static Public Member Functions

static std::unique_ptr< DawnCommandBufferMake (const DawnSharedContext *, DawnResourceProvider *)
 

Additional Inherited Members

- Public Types inherited from skgpu::graphite::CommandBuffer
using DrawPassList = skia_private::TArray< std::unique_ptr< DrawPass > >
 
using DispatchGroupSpan = SkSpan< const std::unique_ptr< DispatchGroup > >
 
- Protected Member Functions inherited from skgpu::graphite::CommandBuffer
 CommandBuffer ()
 
- Protected Attributes inherited from skgpu::graphite::CommandBuffer
SkISize fRenderPassSize
 
SkIVector fReplayTranslation
 

Detailed Description

Definition at line 31 of file DawnCommandBuffer.h.

Constructor & Destructor Documentation

◆ ~DawnCommandBuffer()

skgpu::graphite::DawnCommandBuffer::~DawnCommandBuffer ( )
override

Definition at line 60 of file DawnCommandBuffer.cpp.

60{}

Member Function Documentation

◆ finishEncoding()

wgpu::CommandBuffer skgpu::graphite::DawnCommandBuffer::finishEncoding ( )

Definition at line 62 of file DawnCommandBuffer.cpp.

62 {
63 SkASSERT(fCommandEncoder);
64 wgpu::CommandBuffer cmdBuffer = fCommandEncoder.Finish();
65
66 fCommandEncoder = nullptr;
67
68 return cmdBuffer;
69}
#define SkASSERT(cond)
Definition: SkAssert.h:116

◆ Make()

std::unique_ptr< DawnCommandBuffer > skgpu::graphite::DawnCommandBuffer::Make ( const DawnSharedContext sharedContext,
DawnResourceProvider resourceProvider 
)
static

Definition at line 45 of file DawnCommandBuffer.cpp.

46 {
47 std::unique_ptr<DawnCommandBuffer> cmdBuffer(
48 new DawnCommandBuffer(sharedContext, resourceProvider));
49 if (!cmdBuffer->setNewCommandBufferResources()) {
50 return {};
51 }
52 return cmdBuffer;
53}

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