Flutter Engine
The Flutter Engine
|
#include <Renderer.h>
Public Member Functions | |
virtual | ~RenderStep ()=default |
virtual void | writeVertices (DrawWriter *, const DrawParams &, skvx::ushort2 ssboIndices) const =0 |
virtual void | writeUniformsAndTextures (const DrawParams &, PipelineDataGatherer *) const =0 |
virtual std::string | vertexSkSL () const =0 |
virtual std::string | texturesAndSamplersSkSL (const ResourceBindingRequirements &, int *nextBindingIndex) const |
virtual const char * | fragmentCoverageSkSL () const |
virtual const char * | fragmentColorSkSL () const |
uint32_t | uniqueID () const |
const char * | name () const |
bool | requiresMSAA () const |
bool | performsShading () const |
bool | hasTextures () const |
bool | emitsPrimitiveColor () const |
bool | outsetBoundsForAA () const |
Coverage | coverage () const |
PrimitiveType | primitiveType () const |
size_t | vertexStride () const |
size_t | instanceStride () const |
size_t | numUniforms () const |
size_t | numVertexAttributes () const |
size_t | numInstanceAttributes () const |
SkSpan< const Uniform > | uniforms () const |
SkSpan< const Attribute > | vertexAttributes () const |
SkSpan< const Attribute > | instanceAttributes () const |
SkSpan< const Varying > | varyings () const |
const DepthStencilSettings & | depthStencilSettings () const |
SkEnumBitMask< DepthStencilFlags > | depthStencilFlags () const |
Static Public Member Functions | |
static const char * | ssboIndicesAttribute () |
static const char * | ssboIndicesVarying () |
Protected Types | |
enum class | Flags : unsigned { kNone = 0b0000000 , kRequiresMSAA = 0b0000001 , kPerformsShading = 0b0000010 , kHasTextures = 0b0000100 , kEmitsCoverage = 0b0001000 , kLCDCoverage = 0b0010000 , kEmitsPrimitiveColor = 0b0100000 , kOutsetBoundsForAA = 0b1000000 } |
Protected Member Functions | |
RenderStep (std::string_view className, std::string_view variantName, SkEnumBitMask< Flags > flags, std::initializer_list< Uniform > uniforms, PrimitiveType primitiveType, DepthStencilSettings depthStencilSettings, SkSpan< const Attribute > vertexAttrs, SkSpan< const Attribute > instanceAttrs, SkSpan< const Varying > varyings={}) | |
Friends | |
class | Renderer |
The actual technique for rasterizing a high-level draw recorded in a DrawList is handled by a specific Renderer. Each technique has an associated singleton Renderer that decomposes the technique into a series of RenderSteps that must be executed in the specified order for the draw. However, the RenderStep executions for multiple draws can be re-arranged so batches of each step can be performed in a larger GPU operation. This re-arranging relies on accurate determination of the DisjointStencilIndex for each draw so that stencil steps are not corrupted by another draw before its cover step is executed. It also relies on the CompressedPaintersOrder for each draw to ensure steps are not re-arranged in a way that violates the original draw order.
Renderer itself is non-virtual since it simply has to point to a list of RenderSteps. RenderSteps on the other hand are virtual implement the technique specific functionality. It is entirely possible for certain types of steps, e.g. a bounding box cover, to be re-used across different Renderers even if the preceeding steps were different.
All Renderers are accessed through the SharedContext's RendererProvider.
Definition at line 68 of file Renderer.h.
|
strongprotected |
Enumerator | |
---|---|
kNone | |
kRequiresMSAA | |
kPerformsShading | |
kHasTextures | |
kEmitsCoverage | |
kLCDCoverage | |
kEmitsPrimitiveColor | |
kOutsetBoundsForAA |
Definition at line 165 of file Renderer.h.
|
virtualdefault |
|
protected |
Definition at line 19 of file Renderer.cpp.
|
inline |
Definition at line 124 of file Renderer.h.
|
inline |
Definition at line 150 of file Renderer.h.
|
inline |
Definition at line 148 of file Renderer.h.
|
inline |
Definition at line 121 of file Renderer.h.
|
inlinevirtual |
Reimplemented in skgpu::graphite::VerticesRenderStep.
Definition at line 110 of file Renderer.h.
|
inlinevirtual |
Reimplemented in skgpu::graphite::AnalyticBlurRenderStep, skgpu::graphite::AnalyticRRectRenderStep, skgpu::graphite::BitmapTextRenderStep, skgpu::graphite::CoverageMaskRenderStep, skgpu::graphite::PerEdgeAAQuadRenderStep, skgpu::graphite::SDFTextLCDRenderStep, and skgpu::graphite::SDFTextRenderStep.
Definition at line 105 of file Renderer.h.
|
inline |
Definition at line 120 of file Renderer.h.
Definition at line 145 of file Renderer.h.
|
inline |
Definition at line 128 of file Renderer.h.
|
inline |
Definition at line 116 of file Renderer.h.
|
inline |
Definition at line 132 of file Renderer.h.
|
inline |
Definition at line 130 of file Renderer.h.
|
inline |
Definition at line 131 of file Renderer.h.
|
inline |
Definition at line 122 of file Renderer.h.
|
inline |
Definition at line 119 of file Renderer.h.
|
inline |
Definition at line 126 of file Renderer.h.
|
inline |
Definition at line 118 of file Renderer.h.
|
inlinestatic |
Definition at line 135 of file Renderer.h.
|
inlinestatic |
Definition at line 139 of file Renderer.h.
|
inlinevirtual |
Reimplemented in skgpu::graphite::AnalyticBlurRenderStep, skgpu::graphite::BitmapTextRenderStep, skgpu::graphite::CoverageMaskRenderStep, skgpu::graphite::SDFTextLCDRenderStep, and skgpu::graphite::SDFTextRenderStep.
Definition at line 96 of file Renderer.h.
Definition at line 143 of file Renderer.h.
|
inline |
Definition at line 112 of file Renderer.h.
Definition at line 146 of file Renderer.h.
Definition at line 144 of file Renderer.h.
|
pure virtual |
Implemented in skgpu::graphite::AnalyticBlurRenderStep, skgpu::graphite::AnalyticRRectRenderStep, skgpu::graphite::BitmapTextRenderStep, skgpu::graphite::CoverageMaskRenderStep, skgpu::graphite::CoverBoundsRenderStep, skgpu::graphite::MiddleOutFanRenderStep, skgpu::graphite::PerEdgeAAQuadRenderStep, skgpu::graphite::SDFTextLCDRenderStep, skgpu::graphite::SDFTextRenderStep, skgpu::graphite::TessellateCurvesRenderStep, skgpu::graphite::TessellateStrokesRenderStep, skgpu::graphite::TessellateWedgesRenderStep, and skgpu::graphite::VerticesRenderStep.
|
inline |
Definition at line 127 of file Renderer.h.
|
pure virtual |
Implemented in skgpu::graphite::AnalyticBlurRenderStep, skgpu::graphite::AnalyticRRectRenderStep, skgpu::graphite::BitmapTextRenderStep, skgpu::graphite::CoverageMaskRenderStep, skgpu::graphite::CoverBoundsRenderStep, skgpu::graphite::MiddleOutFanRenderStep, skgpu::graphite::PerEdgeAAQuadRenderStep, skgpu::graphite::SDFTextLCDRenderStep, skgpu::graphite::SDFTextRenderStep, skgpu::graphite::TessellateCurvesRenderStep, skgpu::graphite::TessellateStrokesRenderStep, skgpu::graphite::TessellateWedgesRenderStep, and skgpu::graphite::VerticesRenderStep.
|
pure virtual |
Implemented in skgpu::graphite::AnalyticBlurRenderStep, skgpu::graphite::AnalyticRRectRenderStep, skgpu::graphite::BitmapTextRenderStep, skgpu::graphite::CoverageMaskRenderStep, skgpu::graphite::CoverBoundsRenderStep, skgpu::graphite::MiddleOutFanRenderStep, skgpu::graphite::PerEdgeAAQuadRenderStep, skgpu::graphite::SDFTextLCDRenderStep, skgpu::graphite::SDFTextRenderStep, skgpu::graphite::TessellateCurvesRenderStep, skgpu::graphite::TessellateStrokesRenderStep, skgpu::graphite::TessellateWedgesRenderStep, and skgpu::graphite::VerticesRenderStep.
|
friend |
Definition at line 191 of file Renderer.h.