Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | List of all members
skgpu::graphite::GraphicsPipeline Class Reference

#include <GraphicsPipeline.h>

Inheritance diagram for skgpu::graphite::GraphicsPipeline:
skgpu::graphite::Resource skgpu::graphite::DawnGraphicsPipeline skgpu::graphite::MtlGraphicsPipeline skgpu::graphite::VulkanGraphicsPipeline

Public Member Functions

 ~GraphicsPipeline () override
 
const char * getResourceType () const override
 
- Public Member Functions inherited from skgpu::graphite::Resource
 Resource (const Resource &)=delete
 
 Resource (Resource &&)=delete
 
Resourceoperator= (const Resource &)=delete
 
Resourceoperator= (Resource &&)=delete
 
void ref () const
 
void unref () const
 
void refCommandBuffer () const
 
void unrefCommandBuffer () const
 
Ownership ownership () const
 
skgpu::Budgeted budgeted () const
 
size_t gpuMemorySize () const
 
UniqueID uniqueID () const
 
virtual const char * getResourceType () const =0
 
std::string getLabel () const
 
void setLabel (std::string_view label)
 
bool wasDestroyed () const
 
const GraphiteResourceKeykey () const
 
void setKey (const GraphiteResourceKey &key)
 
void dumpMemoryStatistics (SkTraceMemoryDump *traceMemoryDump) const
 
virtual void prepareForReturnToCache (const std::function< void()> &takeRef)
 

Protected Member Functions

 GraphicsPipeline (const SharedContext *, PipelineInfo *)
 
- Protected Member Functions inherited from skgpu::graphite::Resource
 Resource (const SharedContext *, Ownership, skgpu::Budgeted, size_t gpuMemorySize, bool commandBufferRefsAsUsageRefs=false)
 
virtual ~Resource ()
 
const SharedContextsharedContext () const
 
virtual void onDumpMemoryStatistics (SkTraceMemoryDump *traceMemoryDump, const char *dumpName) const
 
void setDeleteASAP ()
 

Detailed Description

GraphicsPipeline corresponds to a backend specific pipeline used for rendering (vs. compute), e.g. MTLRenderPipelineState (Metal), CreateRenderPipeline (Dawn), CreateGraphicsPipelineState (D3D12), or VkGraphicsPipelineCreateInfo (Vulkan).

A GraphicsPipeline is created from the combination of a GraphicsPipelineDesc (representing draw specific configuration) and a RenderPassDesc (representing the target of the draw).

Definition at line 26 of file GraphicsPipeline.h.

Constructor & Destructor Documentation

◆ ~GraphicsPipeline()

skgpu::graphite::GraphicsPipeline::~GraphicsPipeline ( )
overridedefault

◆ GraphicsPipeline()

skgpu::graphite::GraphicsPipeline::GraphicsPipeline ( const SharedContext sharedContext,
PipelineInfo *  pipelineInfo 
)
protected

Definition at line 13 of file GraphicsPipeline.cpp.

17 /*gpuMemorySize=*/0) {
18#if defined(GRAPHITE_TEST_UTILS)
19 if (pipelineInfo) {
20 fPipelineInfo.fRenderStepID = pipelineInfo->fRenderStepID;
21 fPipelineInfo.fPaintID = pipelineInfo->fPaintID;
22 fPipelineInfo.fSkSLVertexShader =
23 SkShaderUtils::PrettyPrint(pipelineInfo->fSkSLVertexShader);
24 fPipelineInfo.fSkSLFragmentShader =
25 SkShaderUtils::PrettyPrint(pipelineInfo->fSkSLFragmentShader);
26 fPipelineInfo.fNativeVertexShader = std::move(pipelineInfo->fNativeVertexShader);
27 fPipelineInfo.fNativeFragmentShader = std::move(pipelineInfo->fNativeFragmentShader);
28 }
29#endif
30}
Resource(const Resource &)=delete
const SharedContext * sharedContext() const
Definition: Resource.h:189
std::string PrettyPrint(const std::string &string)

Member Function Documentation

◆ getResourceType()

const char * skgpu::graphite::GraphicsPipeline::getResourceType ( ) const
inlineoverridevirtual

Implements skgpu::graphite::Resource.

Definition at line 30 of file GraphicsPipeline.h.

30{ return "Graphics Pipeline"; }

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