Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Friends | List of all members
skgpu::graphite::RendererProvider Class Reference

#include <RendererProvider.h>

Public Member Functions

 ~RendererProvider ()
 
const RendererstencilTessellatedCurvesAndTris (SkPathFillType type) const
 
const RendererstencilTessellatedWedges (SkPathFillType type) const
 
const RendererconvexTessellatedWedges () const
 
const RenderertessellatedStrokes () const
 
const RenderercoverageMask () const
 
const RendererbitmapText (bool useLCDText) const
 
const RenderersdfText (bool useLCDText) const
 
const Renderervertices (SkVertices::VertexMode mode, bool hasColors, bool hasTexCoords) const
 
const RendereranalyticRRect () const
 
const RendererperEdgeAAQuad () const
 
const RendereranalyticBlur () const
 
SkSpan< const Renderer *const > renderers () const
 
const RenderSteplookup (uint32_t uniqueID) const
 

Static Public Member Functions

static bool IsVelloRendererSupported (const Caps *)
 

Friends

class Context
 

Detailed Description

Graphite defines a limited set of renderers in order to increase the likelihood of batching across draw calls, and reducing the number of shader permutations required. These Renderers are stateless singletons and remain alive for the life of the Context and its Recorders.

Because Renderers are immutable and the defined Renderers are created at context initialization, RendererProvider is trivially thread-safe.

Definition at line 34 of file RendererProvider.h.

Constructor & Destructor Documentation

◆ ~RendererProvider()

skgpu::graphite::RendererProvider::~RendererProvider ( )
default

Member Function Documentation

◆ analyticBlur()

const Renderer * skgpu::graphite::RendererProvider::analyticBlur ( ) const
inline

Definition at line 74 of file RendererProvider.h.

74{ return &fAnalyticBlur; }

◆ analyticRRect()

const Renderer * skgpu::graphite::RendererProvider::analyticRRect ( ) const
inline

Definition at line 69 of file RendererProvider.h.

69{ return &fAnalyticRRect; }

◆ bitmapText()

const Renderer * skgpu::graphite::RendererProvider::bitmapText ( bool  useLCDText) const
inline

Definition at line 58 of file RendererProvider.h.

58{ return &fBitmapText[useLCDText]; }

◆ convexTessellatedWedges()

const Renderer * skgpu::graphite::RendererProvider::convexTessellatedWedges ( ) const
inline

Definition at line 51 of file RendererProvider.h.

51{ return &fConvexTessellatedWedges; }

◆ coverageMask()

const Renderer * skgpu::graphite::RendererProvider::coverageMask ( ) const
inline

Definition at line 55 of file RendererProvider.h.

55{ return &fCoverageMask; }

◆ IsVelloRendererSupported()

bool skgpu::graphite::RendererProvider::IsVelloRendererSupported ( const Caps caps)
static

Definition at line 35 of file RendererProvider.cpp.

35 {
36#ifdef SK_ENABLE_VELLO_SHADERS
37 return caps->computeSupport();
38#else
39 return false;
40#endif
41}

◆ lookup()

const RenderStep * skgpu::graphite::RendererProvider::lookup ( uint32_t  uniqueID) const

Definition at line 160 of file RendererProvider.cpp.

160 {
161 for (auto&& rs : fRenderSteps) {
162 if (rs->uniqueID() == uniqueID) {
163 return rs.get();
164 }
165 }
166 return nullptr;
167}

◆ perEdgeAAQuad()

const Renderer * skgpu::graphite::RendererProvider::perEdgeAAQuad ( ) const
inline

Definition at line 72 of file RendererProvider.h.

72{ return &fPerEdgeAAQuad; }

◆ renderers()

SkSpan< const Renderer *const > skgpu::graphite::RendererProvider::renderers ( ) const
inline

Definition at line 81 of file RendererProvider.h.

81 {
82 return {fRenderers.data(), fRenderers.size()};
83 }

◆ sdfText()

const Renderer * skgpu::graphite::RendererProvider::sdfText ( bool  useLCDText) const
inline

Definition at line 59 of file RendererProvider.h.

59{ return &fSDFText[useLCDText]; }

◆ stencilTessellatedCurvesAndTris()

const Renderer * skgpu::graphite::RendererProvider::stencilTessellatedCurvesAndTris ( SkPathFillType  type) const
inline

Definition at line 45 of file RendererProvider.h.

45 {
46 return &fStencilTessellatedCurves[(int) type];
47 }
GLenum type

◆ stencilTessellatedWedges()

const Renderer * skgpu::graphite::RendererProvider::stencilTessellatedWedges ( SkPathFillType  type) const
inline

Definition at line 48 of file RendererProvider.h.

48 {
49 return &fStencilTessellatedWedges[(int) type];
50 }

◆ tessellatedStrokes()

const Renderer * skgpu::graphite::RendererProvider::tessellatedStrokes ( ) const
inline

Definition at line 52 of file RendererProvider.h.

52{ return &fTessellatedStrokes; }

◆ vertices()

const Renderer * skgpu::graphite::RendererProvider::vertices ( SkVertices::VertexMode  mode,
bool  hasColors,
bool  hasTexCoords 
) const
inline

Definition at line 62 of file RendererProvider.h.

62 {
63 SkASSERT(mode != SkVertices::kTriangleFan_VertexMode); // Should be converted to kTriangles
65 return &fVertices[4*triStrip + 2*hasColors + hasTexCoords];
66 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
@ kTriangleStrip_VertexMode
Definition: SkVertices.h:32
@ kTriangleFan_VertexMode
Definition: SkVertices.h:33
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
Definition: switches.h:228

Friends And Related Function Documentation

◆ Context

friend class Context
friend

Definition at line 96 of file RendererProvider.h.


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