32static constexpr PatchAttribs kAttribs = PatchAttribs::kPaintDepth |
33 PatchAttribs::kSsboIndex;
34static constexpr PatchAttribs kAttribsWithCurveType = kAttribs | PatchAttribs::kExplicitCurveType;
45static constexpr Attribute kBaseAttributes[] = {
51static constexpr Attribute kAttributesWithCurveType[] = {
67 evenOdd ?
"even-odd" :
"winding",
72 {{
"resolveLevel_and_idx",
75 , fInfinitySupport(infinitySupport) {
77 PatchStride(infinitySupport ? kAttribs : kAttribsWithCurveType));
83 auto vertexData = bufferManager->getVertexWriter(vertexSize, &fVertexBuffer);
89 auto indexData = bufferManager->getIndexWriter(indexSize, &fIndexBuffer);
100 // TODO: Approximate perspective scaling to match how PatchWriter is configured (or
101 // provide explicit tessellation level in instance data instead of replicating
103 float2x2 vectorXform = float2x2(localToDevice[0].xy, localToDevice[1].xy);
104 float2 localCoord = tessellate_filled_curve(
105 vectorXform, resolveLevel_and_idx.x, resolveLevel_and_idx.y, p01, p23, %s);
106 float4 devPosition = localToDevice * float4(localCoord, 0.0, 1.0);
107 devPosition.z = depth;
108 stepLocalCoords = localCoord;
110 fInfinitySupport ? "curve_type_using_inf_support(p23)" :
"curveType");
119 Writer writer{fInfinitySupport ? kAttribs : kAttribsWithCurveType,
124 writer.updatePaintDepthAttrib(
params.order().depthAsFloat());
125 writer.updateSsboIndexAttrib(ssboIndices);
133 params.transform().maxScaleFactor());
153 PipelineDataGatherer* gatherer)
const {
156 gatherer->write(
params.transform().matrix());
@ kCubic
SkPath::RawIter returns 4 points.
@ kConic
SkPath::RawIter returns 3 points + 1 weight.
@ kQuad
SkPath::RawIter returns 3 points.
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
size_t instanceStride() const
SkSpan< const Uniform > uniforms() const
TessellateCurvesRenderStep(bool evenOdd, bool infinitySupport, StaticBufferManager *bufferManager)
void writeUniformsAndTextures(const DrawParams &, PipelineDataGatherer *) const override
std::string vertexSkSL() const override
void writeVertices(DrawWriter *, const DrawParams &, skvx::ushort2 ssboIndices) const override
~TessellateCurvesRenderStep() override
static void WriteIndexBuffer(VertexWriter, size_t bufferSize)
static constexpr size_t VertexBufferSize()
static constexpr int PreallocCount(int totalCombinedPathVerbCnt)
static constexpr size_t IndexBufferSize()
static void WriteVertexBuffer(VertexWriter, size_t bufferSize)
const EmbeddedViewParams * params
unsigned useCenter Optional< SkMatrix > matrix
std::string printf(const char *fmt,...) SK_PRINTF_LIKE(1
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
static const std::map< std::string, VerticesBuilder::AttributeType > kAttributes
constexpr DepthStencilSettings kWindingStencilPass
constexpr DepthStencilSettings kEvenOddStencilPass
constexpr size_t PatchStride(PatchAttribs attribs)