![]() |
Flutter Engine
The Flutter Engine
|
#include <GrSimpleMeshDrawOpHelper.h>
Public Types | |
enum class | InputFlags : uint8_t { kNone = 0 , kSnapVerticesToPixelCenters = (uint8_t)GrPipeline::InputFlags::kSnapVerticesToPixelCenters , kConservativeRaster = (uint8_t)GrPipeline::InputFlags::kConservativeRaster } |
Protected Member Functions | |
GrProcessorSet::Analysis | finalizeProcessors (const GrCaps &caps, const GrAppliedClip *, const GrUserStencilSettings *, GrClampType, GrProcessorAnalysisCoverage geometryCoverage, GrProcessorAnalysisColor *geometryColor) |
Protected Attributes | |
GrProcessorSet * | fProcessors |
GrPipeline::InputFlags | fPipelineFlags |
unsigned | fAAType: 2 |
unsigned | fUsesLocalCoords: 1 |
unsigned | fCompatibleWithCoverageAsAlpha: 1 |
This class can be used to help implement simple mesh draw ops. It reduces the amount of boilerplate code to type and also provides a mechanism for optionally allocating space for a GrProcessorSet based on a GrPaint. It is intended to be used by ops that construct a single GrPipeline for a uniform primitive color and a GrPaint.
Definition at line 28 of file GrSimpleMeshDrawOpHelper.h.
|
strong |
Enumerator | |
---|---|
kNone | |
kSnapVerticesToPixelCenters | |
kConservativeRaster |
Definition at line 40 of file GrSimpleMeshDrawOpHelper.h.
GrSimpleMeshDrawOpHelper::GrSimpleMeshDrawOpHelper | ( | GrProcessorSet * | processorSet, |
GrAAType | aaType, | ||
InputFlags | inputFlags = InputFlags::kNone |
||
) |
Definition at line 17 of file GrSimpleMeshDrawOpHelper.cpp.
GrSimpleMeshDrawOpHelper::~GrSimpleMeshDrawOpHelper | ( | ) |
Definition at line 29 of file GrSimpleMeshDrawOpHelper.cpp.
|
delete |
|
delete |
|
inline |
Definition at line 107 of file GrSimpleMeshDrawOpHelper.h.
|
inline |
Definition at line 96 of file GrSimpleMeshDrawOpHelper.h.
const GrPipeline * GrSimpleMeshDrawOpHelper::createPipeline | ( | const GrCaps * | caps, |
SkArenaAlloc * | arena, | ||
skgpu::Swizzle | writeViewSwizzle, | ||
GrAppliedClip && | appliedClip, | ||
const GrDstProxyView & | dstProxyView | ||
) |
Definition at line 148 of file GrSimpleMeshDrawOpHelper.cpp.
|
static |
Definition at line 107 of file GrSimpleMeshDrawOpHelper.cpp.
|
static |
Definition at line 126 of file GrSimpleMeshDrawOpHelper.cpp.
const GrPipeline * GrSimpleMeshDrawOpHelper::createPipeline | ( | GrOpFlushState * | flushState | ) |
Definition at line 138 of file GrSimpleMeshDrawOpHelper.cpp.
|
static |
Definition at line 188 of file GrSimpleMeshDrawOpHelper.cpp.
GrProgramInfo * GrSimpleMeshDrawOpHelper::createProgramInfo | ( | const GrCaps * | caps, |
SkArenaAlloc * | arena, | ||
const GrSurfaceProxyView & | writeView, | ||
bool | usesMSAASurface, | ||
GrAppliedClip && | appliedClip, | ||
const GrDstProxyView & | dstProxyView, | ||
GrGeometryProcessor * | gp, | ||
GrPrimitiveType | primType, | ||
GrXferBarrierFlags | renderPassXferBarriers, | ||
GrLoadOp | colorLoadOp | ||
) |
Definition at line 210 of file GrSimpleMeshDrawOpHelper.cpp.
|
static |
Definition at line 162 of file GrSimpleMeshDrawOpHelper.cpp.
|
inline |
Definition at line 175 of file GrSimpleMeshDrawOpHelper.h.
|
static |
This can be used by a Op class to perform allocation and initialization such that a GrProcessorSet (if required) is allocated as part of the the same allocation that as the Op instance. It requires that Op implements a constructor of the form: Op(ProcessorSet*, GrColor, OpArgs...).
GrOp::Owner GrSimpleMeshDrawOpHelper::FactoryHelper | ( | GrRecordingContext * | context, |
GrPaint && | paint, | ||
OpArgs &&... | opArgs | ||
) |
Definition at line 207 of file GrSimpleMeshDrawOpHelper.h.
GrProcessorSet::Analysis GrSimpleMeshDrawOpHelper::finalizeProcessors | ( | const GrCaps & | caps, |
const GrAppliedClip * | clip, | ||
GrClampType | clampType, | ||
GrProcessorAnalysisCoverage | geometryCoverage, | ||
SkPMColor4f * | geometryColor, | ||
bool * | wideColor | ||
) |
Version of above that can be used by ops that have a constant color geometry processor output. The op passes this color as 'geometryColor' and after return if 'geometryColor' has changed the op must override its geometry processor color output with the new color.
Definition at line 68 of file GrSimpleMeshDrawOpHelper.cpp.
|
protected |
Definition at line 80 of file GrSimpleMeshDrawOpHelper.cpp.
|
inline |
Finalizes the processor set and determines whether the destination must be provided to the fragment shader as a texture for blending.
geometryCoverage | Describes the coverage output of the op's geometry processor |
geometryColor | An in/out param. As input this informs processor analysis about the color the op expects to output from its geometry processor. As output this may be set to a known color in which case the op must output this color from its geometry processor instead. |
Definition at line 70 of file GrSimpleMeshDrawOpHelper.h.
GrDrawOp::FixedFunctionFlags GrSimpleMeshDrawOpHelper::fixedFunctionFlags | ( | ) | const |
Definition at line 35 of file GrSimpleMeshDrawOpHelper.cpp.
GrSimpleMeshDrawOpHelper::GR_DECL_BITFIELD_CLASS_OPS_FRIENDS | ( | InputFlags | ) |
bool GrSimpleMeshDrawOpHelper::isCompatible | ( | const GrSimpleMeshDrawOpHelper & | that, |
const GrCaps & | caps, | ||
const SkRect & | thisBounds, | ||
const SkRect & | thatBounds, | ||
bool | ignoreAAType = false |
||
) | const |
Definition at line 40 of file GrSimpleMeshDrawOpHelper.cpp.
|
inline |
Definition at line 87 of file GrSimpleMeshDrawOpHelper.h.
|
delete |
|
inline |
Definition at line 179 of file GrSimpleMeshDrawOpHelper.h.
|
inline |
Definition at line 109 of file GrSimpleMeshDrawOpHelper.h.
|
inline |
Definition at line 91 of file GrSimpleMeshDrawOpHelper.h.
|
inline |
Definition at line 98 of file GrSimpleMeshDrawOpHelper.h.
|
protected |
Definition at line 189 of file GrSimpleMeshDrawOpHelper.h.
|
protected |
Definition at line 191 of file GrSimpleMeshDrawOpHelper.h.
|
protected |
Definition at line 188 of file GrSimpleMeshDrawOpHelper.h.
|
protected |
Definition at line 187 of file GrSimpleMeshDrawOpHelper.h.
|
protected |
Definition at line 190 of file GrSimpleMeshDrawOpHelper.h.