161 {
162#if !defined(SK_ENABLE_OPTIMIZE_SIZE)
164 (extraTriangles ? extraTriangles->
count() : 0);
165#else
168#endif
169
170
171 if (patchPreallocCount) {
172 LinearTolerances worstCase;
174
175#if !defined(SK_ENABLE_OPTIMIZE_SIZE)
176
177
178 if (extraTriangles) {
180 for (
const auto* tri = extraTriangles->
head(); tri; tri = tri->
fNext) {
185 if (
any((p0 == p1) & (p1 == p2))) {
186
187
188
189
190
191 continue;
192 }
193 writer.writeTriangle(p0, p1, p2);
194 }
196 }
197#endif
198
199 write_curve_patches(std::move(writer), shaderMatrix, pathDrawList);
201 }
202
204
206
209 gFixedCountCurveVertexBufferKey,
211
213
216 gFixedCountCurveIndexBufferKey,
218}
#define SKGPU_DEFINE_STATIC_UNIQUE_KEY(name)
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
sk_sp< const GrGpuBuffer > findOrMakeStaticBuffer(GrGpuBufferType intendedType, size_t size, const skgpu::UniqueKey &key, InitializeBufferFn)
const Node * head() const
static void WriteIndexBuffer(VertexWriter, size_t bufferSize)
static constexpr size_t VertexBufferSize()
static int VertexCount(const LinearTolerances &tolerances)
static constexpr int PreallocCount(int totalCombinedPathVerbCnt)
static constexpr size_t IndexBufferSize()
static void WriteVertexBuffer(VertexWriter, size_t bufferSize)
SIT bool any(const Vec< 1, T > &x)
static SKVX_ALWAYS_INLINE Vec Load(const void *ptr)