38#define PREALLOC_PTARRAY(N) STArray<(N),SkPoint, true>
72static const uint16_t kQuadIdxBufPattern[] = {
78static const int kIdxsPerQuad =
std::size(kQuadIdxBufPattern);
79static const int kQuadNumVertices = 5;
80static const int kQuadsNumInIdxBuffer = 256;
86 kQuadIdxBufPattern, kIdxsPerQuad, kQuadsNumInIdxBuffer, kQuadNumVertices,
87 gQuadsIndexBufferKey);
102static const uint16_t kLineSegIdxBufPattern[] = {
111static const int kIdxsPerLineSeg =
std::size(kLineSegIdxBufPattern);
112static const int kLineSegNumVertices = 6;
113static const int kLineSegsNumInIdxBuffer = 256;
120 kLineSegIdxBufPattern, kIdxsPerLineSeg, kLineSegsNumInIdxBuffer, kLineSegNumVertices,
121 gLinesIndexBufferKey);
125int get_float_exp(
float x) {
126 static_assert(
sizeof(
int) ==
sizeof(
float));
131 SkASSERT(get_float_exp(0.25f) == -2);
132 SkASSERT(get_float_exp(0.3f) == -2);
133 SkASSERT(get_float_exp(0.5f) == -1);
138 SkASSERT(get_float_exp(100.f) == 6);
139 SkASSERT(get_float_exp(1000.f) == 9);
140 SkASSERT(get_float_exp(1024.f) == 10);
141 SkASSERT(get_float_exp(3000000.f) == 21);
144 const int* iptr = (
const int*)&
x;
145 return (((*iptr) & 0x7f800000) >> 23) - 127;
159 if (0 < t && t < 1) {
182 int conicCnt = split_conic(
src, dstTemp, weight);
184 int conicCnt2 = split_conic(dstTemp[0].
fPts,
dst, dstTemp[0].fW);
185 conicCnt = conicCnt2 + split_conic(dstTemp[1].
fPts, &
dst[conicCnt2], dstTemp[1].fW);
197 static const SkScalar gDegenerateToLineTolSqd =
198 gDegenerateToLineTol * gDegenerateToLineTol;
206 if (*dsqd < gDegenerateToLineTolSqd) {
216int is_degen_quad_or_conic(
const SkPoint p[3]) {
218 return is_degen_quad_or_conic(
p, &dsqd);
223int num_quad_subdivs(
const SkPoint p[3]) {
225 if (is_degen_quad_or_conic(
p, &dsqd)) {
235 if (dsqd <= gSubdivTol * gSubdivTol) {
238 static const int kMaxSub = 4;
244 int log = get_float_exp(dsqd/(gSubdivTol*gSubdivTol)) + 1;
263 bool convertConicsToQuads,
271 int totalQuadCount = 0;
275 bool persp =
m.hasPerspective();
280 int verbsInContour = 0;
281 bool seenZeroLengthVerb =
false;
287 auto addChoppedQuad = [&](
const SkPoint srcPts[3],
const SkPoint devPts[4],
288 bool isContourStart) {
291 bounds.setBounds(devPts, 3);
293 bounds.roundOut(&ibounds);
297 int subdiv = num_quad_subdivs(devPts);
305 if (isContourStart && pts[0] == pts[1] && pts[2] == pts[3]) {
306 seenZeroLengthVerb =
true;
311 const SkPoint* qPts = persp ? srcPts : devPts;
317 totalQuadCount += 1 << subdiv;
323 auto addSrcChoppedQuad = [&](
const SkPoint srcSpaceQuadPts[3],
bool isContourStart) {
325 m.mapPoints(devPts, srcSpaceQuadPts, 3);
326 addChoppedQuad(srcSpaceQuadPts, devPts, isContourStart);
329 SkPoint pathPts[4] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};
334 if (convertConicsToQuads) {
339 addSrcChoppedQuad(quadPts + 2 *
i, !verbsInContour && 0 ==
i);
347 for (
int i = 0;
i < conicCnt; ++
i) {
350 m.mapPoints(devPts, chopPnts, 3);
351 bounds.setBounds(devPts, 3);
353 bounds.roundOut(&ibounds);
355 if (is_degen_quad_or_conic(devPts)) {
361 if (verbsInContour == 0 &&
i == 0 && pts[0] == pts[1] &&
363 seenZeroLengthVerb =
true;
368 SkPoint* cPts = persp ? chopPnts : devPts;
383 if (seenZeroLengthVerb && verbsInContour == 1 && capLength > 0) {
389 seenZeroLengthVerb =
false;
393 m.mapPoints(devPts, pathPts, 2);
394 bounds.setBounds(devPts, 2);
396 bounds.roundOut(&ibounds);
401 if (verbsInContour == 0 && pts[0] == pts[1]) {
402 seenZeroLengthVerb =
true;
417 for (
int i = 0;
i < n; ++
i) {
418 addSrcChoppedQuad(choppedPts +
i * 2, !verbsInContour && 0 ==
i);
425 m.mapPoints(devPts, pathPts, 4);
426 bounds.setBounds(devPts, 4);
428 bounds.roundOut(&ibounds);
440 for (
int i = 0;
i < q.size();
i += 3) {
442 addSrcChoppedQuad(&q[
i], !verbsInContour && 0 ==
i);
444 addChoppedQuad(
nullptr, &q[
i], !verbsInContour && 0 ==
i);
455 if (seenZeroLengthVerb && verbsInContour == 1) {
459 }
else if (verbsInContour == 0) {
462 m.mapPoints(devPts, pathPts, 1);
463 devPts[1] = devPts[0];
464 bounds.setBounds(devPts, 2);
466 bounds.roundOut(&ibounds);
469 pts[0] =
SkPoint::Make(devPts[0].fX - capLength, devPts[0].fY);
470 pts[1] =
SkPoint::Make(devPts[1].fX + capLength, devPts[1].fY);
476 if (seenZeroLengthVerb && verbsInContour == 1 && capLength > 0) {
483 return totalQuadCount;
506static_assert(
sizeof(BezierVertex) == 3 *
sizeof(
SkPoint));
522 result->fX = normA.
fY * lineBW - lineAW * normB.
fY;
525 result->fY = lineAW * normB.
fX - normA.
fX * lineBW;
530void set_uv_quad(
const SkPoint qpts[3], BezierVertex verts[kQuadNumVertices]) {
533 DevToUV.
apply(verts, kQuadNumVertices,
sizeof(BezierVertex),
sizeof(
SkPoint));
536bool bloat_quad(
const SkPoint qpts[3],
539 BezierVertex verts[kQuadNumVertices]) {
563 BezierVertex& a0 = verts[0];
564 BezierVertex& a1 = verts[1];
565 BezierVertex& b0 = verts[2];
566 BezierVertex& c0 = verts[3];
567 BezierVertex& c1 = verts[4];
579 bool abNormalized =
ab.normalize();
598 if (abN.
dot(ac) > 0) {
603 if (cbN.
dot(ac) < 0) {
620 intersect_lines(a0.fPos, abN, c0.fPos, cbN, &b0.fPos);
637void set_conic_coeffs(
const SkPoint p[3],
638 BezierVertex verts[kQuadNumVertices],
644 for (
int i = 0;
i < kQuadNumVertices; ++
i) {
645 const SkPoint3 pt3 = {verts[
i].fPos.
x(), verts[
i].fPos.y(), 1.f};
654 BezierVertex** vert) {
655 if (bloat_quad(
p, toDevice, toSrc, *vert)) {
656 set_conic_coeffs(
p, *vert, weight);
657 *vert += kQuadNumVertices;
665 BezierVertex** vert) {
668 BezierVertex outVerts[kQuadNumVertices] = {};
674 memcpy(&choppedQuadPts[2],
p, 3*
sizeof(
SkPoint));
676 int stepCount = 1 << subdiv;
677 while (stepCount > 1) {
685 if (bloat_quad(choppedQuadPts, toDevice, toSrc, outVerts)) {
686 set_uv_quad(choppedQuadPts, outVerts);
687 memcpy(*vert, outVerts, kQuadNumVertices *
sizeof(BezierVertex));
688 *vert += kQuadNumVertices;
694 if (bloat_quad(&choppedQuadPts[2], toDevice, toSrc, outVerts)) {
695 set_uv_quad(&choppedQuadPts[2], outVerts);
696 memcpy(*vert, outVerts, kQuadNumVertices *
sizeof(BezierVertex));
697 *vert += kQuadNumVertices;
715 ortho.
fX = 2.0f * vec.
fY;
716 ortho.
fY = -2.0f * vec.
fX;
720 if (lengthSqd >= 1.0f) {
723 (*vert)[0].fPos =
a + vec;
724 (*vert)[0].fCoverage = floatCoverage;
725 (*vert)[1].fPos =
b - vec;
726 (*vert)[1].fCoverage = floatCoverage;
734 (*vert)[0].fPos =
b - vec;
735 (*vert)[0].fCoverage = floatCoverage *
length;
736 (*vert)[1].fPos =
a + vec;
737 (*vert)[1].fCoverage = floatCoverage *
length;
742 (*vert)[2].fPos =
a - vec + ortho;
743 (*vert)[2].fCoverage = 0;
744 (*vert)[3].fPos =
b + vec + ortho;
745 (*vert)[3].fCoverage = 0;
746 (*vert)[4].fPos =
a - vec - ortho;
747 (*vert)[4].fCoverage = 0;
748 (*vert)[5].fPos =
b + vec - ortho;
749 (*vert)[5].fCoverage = 0;
753 kLineSegNumVertices);
757 for (
int i = 0;
i < kLineSegNumVertices; ++
i) {
762 *vert += kLineSegNumVertices;
782 uint8_t newCoverage = 0xff;
790 return Helper::FactoryHelper<AAHairlineOp>(context, std::move(
paint), newCoverage,
792 devClipBounds, capLength, stencilSettings);
807 fPaths.emplace_back(PathData{viewMatrix,
path, devClipBounds, capLength});
813 const char*
name()
const override {
return "AAHairlineOp"; }
817 bool visited =
false;
818 for (
int i = 0;
i < 3; ++
i) {
819 if (fProgramInfos[
i]) {
820 fProgramInfos[
i]->visitFPProxies(func);
840 enum class Program : uint8_t {
850 bool usesMSAASurface,
851 const SkMatrix* geometryProcessorViewM,
852 const SkMatrix* geometryProcessorLocalM,
857 bool usesMSAASurface,
858 const SkMatrix* geometryProcessorViewM,
859 const SkMatrix* geometryProcessorLocalM,
864 bool usesMSAASurface,
865 const SkMatrix* geometryProcessorViewM,
866 const SkMatrix* geometryProcessorLocalM,
877 Program predictPrograms(
const GrCaps*)
const;
882 bool usesMSAASurface,
899 AAHairlineOp* that = t->
cast<AAHairlineOp>();
901 if (!fHelper.
isCompatible(that->fHelper, caps, this->bounds(), that->bounds())) {
902 return CombineResult::kCannotCombine;
905 if (this->viewMatrix().
hasPerspective() != that->viewMatrix().hasPerspective()) {
906 return CombineResult::kCannotCombine;
912 return CombineResult::kCannotCombine;
918 if (this->
coverage() != that->coverage()) {
919 return CombineResult::kCannotCombine;
922 if (this->
color() != that->color()) {
923 return CombineResult::kCannotCombine;
927 that->viewMatrix())) {
928 return CombineResult::kCannotCombine;
931 fPaths.push_back_n(that->fPaths.size(), that->fPaths.begin());
932 return CombineResult::kMerged;
935#if defined(GR_TEST_UTILS)
936 SkString onDumpInfo()
const override {
937 return SkStringPrintf(
"Color: 0x%08x Coverage: 0x%02x, Count: %d\n%s",
938 fColor.toBytes_RGBA(),
fCoverage, fPaths.size(),
939 fHelper.dumpInfo().c_str());
945 const SkMatrix& viewMatrix()
const {
return fPaths[0].fViewMatrix; }
971 bool usesMSAASurface,
972 const SkMatrix* geometryProcessorViewM,
973 const SkMatrix* geometryProcessorLocalM,
976 if (fProgramInfos[0]) {
985 LocalCoords localCoords(fHelper.usesLocalCoords() ? LocalCoords::kUsePosition_Type
986 : LocalCoords::kUnused_Type);
987 localCoords.
fMatrix = geometryProcessorLocalM;
991 Coverage::kAttribute_Type,
993 *geometryProcessorViewM);
999 renderPassXferBarriers, colorLoadOp, fHelper.stencilSettings());
1005 bool usesMSAASurface,
1006 const SkMatrix* geometryProcessorViewM,
1007 const SkMatrix* geometryProcessorLocalM,
1010 if (fProgramInfos[1]) {
1016 *geometryProcessorViewM,
1018 *geometryProcessorLocalM,
1019 fHelper.usesLocalCoords(),
1025 renderPassXferBarriers, colorLoadOp, fHelper.stencilSettings());
1031 bool usesMSAASurface,
1032 const SkMatrix* geometryProcessorViewM,
1033 const SkMatrix* geometryProcessorLocalM,
1036 if (fProgramInfos[2]) {
1042 *geometryProcessorViewM,
1044 *geometryProcessorLocalM,
1045 fHelper.usesLocalCoords(),
1050 &caps, arena, pipeline, writeView, usesMSAASurface, conicGP,
1052 fHelper.stencilSettings());
1055AAHairlineOp::Program AAHairlineOp::predictPrograms(
const GrCaps* caps)
const {
1061 Program neededPrograms = Program::kLine;
1063 for (
int i = 0;
i < fPaths.size();
i++) {
1064 uint32_t mask = fPaths[
i].fPath.getSegmentMasks();
1070 if (convertConicsToQuads) {
1073 neededPrograms |= Program::kConic;
1078 return neededPrograms;
1081void AAHairlineOp::onCreateProgramInfo(
const GrCaps* caps,
1084 bool usesMSAASurface,
1096 bool hasPerspective = this->viewMatrix().hasPerspective();
1099 if (hasPerspective) {
1100 geometryProcessorViewM = &this->viewMatrix();
1104 auto pipeline = fHelper.createPipeline(caps, arena, writeView.
swizzle(),
1105 std::move(appliedClip), dstProxyView);
1107 if (fCharacterization & Program::kLine) {
1108 this->makeLineProgramInfo(*caps, arena, pipeline, writeView, usesMSAASurface,
1109 geometryProcessorViewM, geometryProcessorLocalM,
1110 renderPassXferBarriers, colorLoadOp);
1113 this->makeQuadProgramInfo(*caps, arena, pipeline, writeView, usesMSAASurface,
1114 geometryProcessorViewM, geometryProcessorLocalM,
1115 renderPassXferBarriers, colorLoadOp);
1117 if (fCharacterization & Program::kConic) {
1118 this->makeConicProgramInfo(*caps, arena, pipeline, writeView, usesMSAASurface,
1119 geometryProcessorViewM, geometryProcessorLocalM,
1120 renderPassXferBarriers, colorLoadOp);
1141 fCharacterization = this->predictPrograms(caps);
1143 this->createProgramInfo(caps, arena, writeView, usesMSAASurface, std::move(appliedClip),
1144 dstProxyView, renderPassXferBarriers, colorLoadOp);
1159 const SkMatrix* toDevice =
nullptr;
1161 if (this->viewMatrix().hasPerspective()) {
1162 toDevice = &this->viewMatrix();
1166 SkDEBUGCODE(Program predictedPrograms = this->predictPrograms(&
target->caps()));
1177 int instanceCount = fPaths.size();
1178 bool convertConicsToQuads = !
target->caps().shaderCaps()->fFloatIs32Bits;
1179 for (
int i = 0;
i < instanceCount;
i++) {
1180 const PathData&
args = fPaths[
i];
1181 quadCount += gather_lines_and_quads(
args.fPath,
args.fViewMatrix,
args.fDevClipBounds,
1182 args.fCapLength, convertConicsToQuads, &
lines, &quads,
1183 &conics, &qSubdivs, &cWeights);
1186 int lineCount =
lines.size() / 2;
1187 int conicCount = conics.
size() / 3;
1188 int quadAndConicCount = conicCount + quadCount;
1190 static constexpr int kMaxLines =
SK_MaxS32 / kLineSegNumVertices;
1191 static constexpr int kMaxQuadsAndConics =
SK_MaxS32 / kQuadNumVertices;
1192 if (lineCount > kMaxLines || quadAndConicCount > kMaxQuadsAndConics) {
1198 SkASSERT(predictedPrograms & Program::kLine);
1199 actualPrograms |= Program::kLine;
1204 std::move(linesIndexBuffer), kLineSegNumVertices,
1205 kIdxsPerLineSeg, lineCount, kLineSegsNumInIdxBuffer);
1207 LineVertex* verts =
reinterpret_cast<LineVertex*
>(helper.
vertices());
1209 SkDebugf(
"Could not allocate vertices\n");
1213 for (
int i = 0;
i < lineCount; ++
i) {
1220 if (quadCount || conicCount) {
1226 int vertexCount = kQuadNumVertices * quadAndConicCount;
1227 void* vertices =
target->makeVertexSpace(
sizeof(BezierVertex), vertexCount, &vertexBuffer,
1230 if (!vertices || !quadsIndexBuffer) {
1231 SkDebugf(
"Could not allocate vertices\n");
1236 BezierVertex* bezVerts =
reinterpret_cast<BezierVertex*
>(vertices);
1238 int unsubdivQuadCnt = quads.
size() / 3;
1239 for (
int i = 0;
i < unsubdivQuadCnt; ++
i) {
1244 add_quads(&quads[3*
i], qSubdivs[
i], toDevice, toSrc, &bezVerts);
1248 for (
int i = 0;
i < conicCount; ++
i) {
1249 add_conics(&conics[3*
i], cWeights[
i], toDevice, toSrc, &bezVerts);
1252 if (quadCount > 0) {
1258 kQuadsNumInIdxBuffer, vertexBuffer, kQuadNumVertices,
1260 firstVertex += quadCount * kQuadNumVertices;
1263 if (conicCount > 0) {
1264 SkASSERT(predictedPrograms & Program::kConic);
1265 actualPrograms |= Program::kConic;
1269 kQuadsNumInIdxBuffer, std::move(vertexBuffer),
1270 kQuadNumVertices, firstVertex);
1276 fCharacterization = actualPrograms;
1280 this->createProgramInfo(flushState);
1282 for (
int i = 0;
i < 3; ++
i) {
1285 flushState->
bindTextures(fProgramInfos[
i]->geomProc(),
nullptr,
1286 fProgramInfos[
i]->pipeline());
1296#if defined(GR_TEST_UTILS)
1298GR_DRAW_OP_TEST_DEFINE(AAHairlineOp) {
1299 SkMatrix viewMatrix = GrTest::TestMatrix(random);
1300 const SkPath&
path = GrTest::TestPath(random);
1305 GrGetRandomStencil(random, context));
1324 if (
args.fShape->style().pathEffect()) {
1329 args.fCaps->shaderCaps()->fShaderDerivativeSupport) {
1337bool AAHairLinePathRenderer::onDrawPath(
const DrawPathArgs&
args) {
1339 "AAHairlinePathRenderer::onDrawPath");
1346 args.fShape->style(), *
args.fClipConservativeBounds,
1347 args.fUserStencilSettings);
1348 args.fSurfaceDrawContext->addDrawOp(
args.fClip, std::move(op));
#define PREALLOC_PTARRAY(N)
#define GR_AUDIT_TRAIL_AUTO_FRAME(audit_trail, framename)
static float GrNormalizeByteToFloat(uint8_t value)
static void add_line(const SkPoint pts[2], PathSegmentArray *segments)
#define DEFINE_OP_CLASS_ID
std::function< void(GrSurfaceProxy *, skgpu::Mipmapped)> GrVisitProxyFunc
#define GR_MAKE_BITFIELD_CLASS_OPS(X)
bool GrIsStrokeHairlineOrEquivalent(const GrStyle &style, const SkMatrix &matrix, SkScalar *outCoverage)
static bool isFinite(const SkRect &r)
#define SKGPU_DECLARE_STATIC_UNIQUE_KEY(name)
#define SKGPU_DEFINE_STATIC_UNIQUE_KEY(name)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static bool SkIsFinite(T x, Pack... values)
static constexpr float sk_ieee_float_divide(float numer, float denom)
void SkChopQuadAt(const SkPoint src[3], SkPoint dst[5], SkScalar t)
SkScalar SkFindQuadMaxCurvature(const SkPoint src[3])
int SkChopQuadAtMaxCurvature(const SkPoint src[3], SkPoint dst[5])
static constexpr int32_t SK_MaxS32
@ kConic
SkPath::RawIter returns 3 points + 1 weight.
@ kLine
SkPath::RawIter returns 2 points.
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
#define INHERITED(method,...)
#define SkScalarRoundToInt(x)
#define SK_ScalarNearlyZero
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
static GrAppliedClip Disabled()
const GrCaps * caps() const
const GrShaderCaps * shaderCaps() const
static GrGeometryProcessor * Make(SkArenaAlloc *arena, const SkPMColor4f &color, const SkMatrix &viewMatrix, const GrCaps &caps, const SkMatrix &localMatrix, bool usesLocalCoords, uint8_t coverage=0xff)
friend class GrSimpleMeshDrawOpHelperWithStencil
virtual FixedFunctionFlags fixedFunctionFlags() const
virtual GrProcessorSet::Analysis finalize(const GrCaps &, const GrAppliedClip *, GrClampType)=0
size_t vertexStride() const
virtual GrProgramInfo * programInfo()=0
virtual void onPrePrepareDraws(GrRecordingContext *, const GrSurfaceProxyView &writeView, GrAppliedClip *, const GrDstProxyView &, GrXferBarrierFlags renderPassXferBarriers, GrLoadOp colorLoadOp)
virtual void onCreateProgramInfo(const GrCaps *, SkArenaAlloc *, const GrSurfaceProxyView &writeView, bool usesMSAASurface, GrAppliedClip &&, const GrDstProxyView &, GrXferBarrierFlags renderPassXferBarriers, GrLoadOp colorLoadOp)=0
virtual void onPrepareDraws(GrMeshDrawTarget *)=0
void drawMesh(const GrSimpleMesh &mesh)
void bindPipelineAndScissorClip(const GrProgramInfo &programInfo, const SkRect &drawBounds)
void bindTextures(const GrGeometryProcessor &geomProc, const GrSurfaceProxy &singleGeomProcTexture, const GrPipeline &pipeline)
virtual void onExecute(GrOpFlushState *, const SkRect &chainBounds)=0
static Owner Make(GrRecordingContext *context, Args &&... args)
std::unique_ptr< GrOp > Owner
virtual const char * name() const =0
virtual void visitProxies(const GrVisitProxyFunc &) const
virtual CombineResult onCombineIfPossible(GrOp *, SkArenaAlloc *, const GrCaps &)
void setTransformedBounds(const SkRect &srcBounds, const SkMatrix &m, HasAABloat aabloat, IsHairline zeroArea)
void apply(void *vertices, int vertexCount, size_t stride, size_t uvOffset) const
static GrGeometryProcessor * Make(SkArenaAlloc *arena, const SkPMColor4f &color, const SkMatrix &viewMatrix, const GrCaps &caps, const SkMatrix &localMatrix, bool usesLocalCoords, uint8_t coverage=0xff)
void recordProgramInfo(const GrProgramInfo *programInfo)
SkArenaAlloc * recordTimeAllocator()
GrRecordingContextPriv priv()
sk_sp< const GrGpuBuffer > findOrCreatePatternedIndexBuffer(const uint16_t *pattern, int patternSize, int reps, int vertCount, const skgpu::UniqueKey &key)
GrProcessorSet::Analysis finalizeProcessors(const GrCaps &caps, const GrAppliedClip *clip, GrClampType clampType, GrProcessorAnalysisCoverage geometryCoverage, GrProcessorAnalysisColor *geometryColor)
void visitProxies(const GrVisitProxyFunc &func) const
GrDrawOp::FixedFunctionFlags fixedFunctionFlags() const
bool isCompatible(const GrSimpleMeshDrawOpHelperWithStencil &that, const GrCaps &, const SkRect &thisBounds, const SkRect &thatBounds, bool ignoreAAType=false) const
bool usesLocalCoords() const
static GrProgramInfo * CreateProgramInfo(const GrCaps *, SkArenaAlloc *, const GrPipeline *, const GrSurfaceProxyView &writeView, bool usesMSAASurface, GrGeometryProcessor *, GrPrimitiveType, GrXferBarrierFlags renderPassXferBarriers, GrLoadOp colorLoadOp, const GrUserStencilSettings *=&GrUserStencilSettings::kUnused)
static const GrStyle & SimpleHairline()
const SkStrokeRec & strokeRec() const
skgpu::Swizzle swizzle() const
GrRenderTargetProxy * asRenderTargetProxy() const
static bool CheapEqual(const SkMatrix &a, const SkMatrix &b)
static void MapPointsWithStride(const SkMatrix &mx, SkPoint pts[], size_t stride, int count)
void mapHomogeneousPoints(SkPoint3 dst[], const SkPoint3 src[], int count) const
void mapPoints(SkPoint dst[], const SkPoint src[], int count) const
static const SkMatrix & I()
bool hasPerspective() const
@ kButt_Cap
no stroke extension
Verb next(SkPoint pts[4])
SkScalar conicWeight() const
const SkRect & getBounds() const
static SkPoint MakeOrthog(const SkPoint &vec, Side side=kLeft_Side)
static SkScalar LengthSqd(const SkPoint &pt)
static SkScalar DistanceToLineBetweenSqd(const SkPoint &pt, const SkPoint &a, const SkPoint &b, Side *side=nullptr)
static SkScalar DistanceToSqd(const SkPoint &pt, const SkPoint &a)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
static float max(float r, float g, float b)
static float min(float r, float g, float b)
GrGeometryProcessor * Make(SkArenaAlloc *, const Color &, const Coverage &, const LocalCoords &, const SkMatrix &viewMatrix)
void convertCubicToQuads(const SkPoint p[4], SkScalar tolScale, skia_private::TArray< SkPoint, true > *quads)
static const SkScalar kDefaultTolerance
SkScalar scaleToleranceToSrc(SkScalar devTol, const SkMatrix &viewM, const SkRect &pathBounds)
void getConicKLM(const SkPoint p[3], const SkScalar weight, SkMatrix *klm)
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
Optional< SkRect > bounds
const CatchEntryMove ab[]
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
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
void setIndexedPatterned(sk_sp< const GrBuffer > indexBuffer, int indexCount, int patternRepeatCount, int maxPatternRepetitionsInIndexBuffer, sk_sp< const GrBuffer > vertexBuffer, int patternVertexCount, int baseVertex)
static bool Intersects(const SkIRect &a, const SkIRect &b)
bool setLength(float length)
float dot(const SkVector &vec) const
static constexpr SkPoint Make(float x, float y)