Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
 
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, std::string_view label, bool commandBufferRefsAsUsageRefs=false)
 
virtual ~Resource ()
 
const SharedContextsharedContext () const
 
virtual void freeGpuData ()=0
 
virtual void invokeReleaseProc ()
 
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 /*label=*/"GraphicsPipeline") {
19#if defined(GRAPHITE_TEST_UTILS)
20 if (pipelineInfo) {
21 fPipelineInfo.fRenderStepID = pipelineInfo->fRenderStepID;
22 fPipelineInfo.fPaintID = pipelineInfo->fPaintID;
23 fPipelineInfo.fSkSLVertexShader =
24 SkShaderUtils::PrettyPrint(pipelineInfo->fSkSLVertexShader);
25 fPipelineInfo.fSkSLFragmentShader =
26 SkShaderUtils::PrettyPrint(pipelineInfo->fSkSLFragmentShader);
27 fPipelineInfo.fNativeVertexShader = std::move(pipelineInfo->fNativeVertexShader);
28 fPipelineInfo.fNativeFragmentShader = std::move(pipelineInfo->fNativeFragmentShader);
29 }
30#endif
31}
Resource(const Resource &)=delete
const SharedContext * sharedContext() const
Definition Resource.h:187
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: