19 inverseFill ?
"inverse" :
"regular",
20 Flags::kPerformsShading,
33 , fInverseFill(inverseFill) {}
40 return "float4 devPosition = cover_bounds_vertex_fn("
41 "float2(sk_VertexID / 2, sk_VertexID % 2), "
42 "bounds, depth, float3x3(mat0, mat1, mat2), "
43 "stepLocalCoords);\n";
61 m = &
params.transform().inverse();
64 m = &
params.transform().matrix();
68 instances.append(1) <<
bounds <<
params.order().depthAsFloat() << ssboIndices
69 <<
m->rc(0,0) <<
m->rc(1,0) <<
m->rc(3,0)
70 <<
m->rc(0,1) <<
m->rc(1,1) <<
m->rc(3,1)
71 <<
m->rc(0,3) <<
m->rc(1,3) <<
m->rc(3,3);
std::string vertexSkSL() const override
void writeVertices(DrawWriter *, const DrawParams &, skvx::ushort2 ssboIndices) const override
CoverBoundsRenderStep(bool inverseFill)
void writeUniformsAndTextures(const DrawParams &, PipelineDataGatherer *) const override
~CoverBoundsRenderStep() override
const EmbeddedViewParams * params
Optional< SkRect > bounds
constexpr DepthStencilSettings kRegularCoverPass
constexpr DepthStencilSettings kInverseCoverPass
SI Vec< sizeof...(Ix), T > shuffle(const Vec< N, T > &)
static SKVX_ALWAYS_INLINE Vec Load(const void *ptr)