995 {
996 if (!fuzz || !canvas || depth <= 0) {
997 return;
998 }
1002 for (
unsigned loop = 0; loop <
N; ++loop) {
1004 return;
1005 }
1008 unsigned drawCommand;
1010 switch (drawCommand) {
1011 case 0:
1012#if defined(SK_GANESH)
1014 dContext->flushAndSubmit();
1015 }
1016#endif
1017 break;
1018 case 1:
1020 break;
1021 case 2: {
1026 break;
1027 }
1028 case 3: {
1032 break;
1033 }
1034 case 4:
1037 break;
1038 case 5:
1040 break;
1041 case 6: {
1042 uint8_t alpha;
1045 break;
1046 }
1047 case 7: {
1049 uint8_t alpha;
1052 break;
1053 }
1054 case 8: {
1057 if (make_fuzz_t<bool>(fuzz)) {
1060 }
1061 if (make_fuzz_t<bool>(fuzz)) {
1064 }
1066 if (make_fuzz_t<bool>(fuzz)) {
1069 }
1070
1071
1072
1073
1074
1076 break;
1077 }
1078 case 9:
1080 break;
1081 case 10: {
1082 int saveCount;
1083 fuzz->
next(&saveCount);
1085 break;
1086 }
1087 case 11: {
1091 break;
1092 }
1093 case 12: {
1097 break;
1098 }
1099 case 13: {
1103 break;
1104 }
1105 case 14: {
1109 break;
1110 }
1111 case 15: {
1115 break;
1116 }
1117 case 16: {
1121 break;
1122 }
1123 case 17: {
1127 break;
1128 }
1129 case 18:
1131 break;
1132 case 19: {
1134 int op;
1135 bool doAntiAlias;
1136 fuzz->
next(&r, &doAntiAlias);
1140 break;
1141 }
1142 case 20: {
1144 int op;
1145 bool doAntiAlias;
1147 fuzz->
next(&doAntiAlias);
1150 break;
1151 }
1152 case 21: {
1155 int op;
1156 bool doAntiAlias;
1157 fuzz->
next(&doAntiAlias);
1160 break;
1161 }
1162 case 22: {
1164 int op;
1168 break;
1169 }
1170 case 23:
1173 break;
1174 case 24: {
1185 break;
1186 }
1187 case 25: {
1192 break;
1193 }
1195 break;
1196 }
1197 case 26: {
1202 break;
1203 }
1204 case 27: {
1209 break;
1210 }
1212 break;
1213 }
1214 case 28: break;
1215 case 29: {
1220 break;
1221 }
1222 case 30: {
1229 }
1230 break;
1231 }
1232 case 31: {
1236 bool useCenter;
1237 fuzz->
next(&r, &
start, &sweep, &useCenter);
1239 break;
1240 }
1241 case 32: {
1246 break;
1247 }
1248 case 33: {
1251 bool usePaint;
1252 fuzz->
next(&
left, &top, &usePaint);
1253 if (usePaint) {
1255 }
1257 usePaint ? &
paint :
nullptr);
1258 break;
1259 }
1260 case 35: {
1264 bool usePaint;
1266 if (usePaint) {
1268 }
1273 usePaint ? &
paint :
nullptr, constraint);
1274 break;
1275 }
1276 case 37: {
1280 bool usePaint;
1281 fuzz->
next(&usePaint);
1282 if (usePaint) {
1284 }
1285 if (make_fuzz_t<bool>(fuzz)) {
1287 } else {
1292 }
1295 usePaint ? &
paint :
nullptr);
1296 break;
1297 }
1298 case 44: {
1300 bool usePaint;
1303 if (usePaint) {
1305 }
1306 constexpr int kMax = 6;
1309 fuzz->
nextRange(&lattice.fXCount, 2, kMax);
1310 fuzz->
nextRange(&lattice.fYCount, 2, kMax);
1314 usePaint ? &
paint :
nullptr);
1315 break;
1316 }
1317 case 45: {
1326 break;
1327 }
1328 case 46: {
1329
1330 break;
1331 }
1332 case 47: {
1333
1334 break;
1335 }
1336 case 48: {
1337
1338 break;
1339 }
1340 case 49: {
1341
1342 break;
1343 }
1344 case 50: {
1345
1346 break;
1347 }
1348 case 51: {
1354 break;
1355 }
1356 case 52: {
1358 bool usePaint, useMatrix;
1359 fuzz->
next(&usePaint, &useMatrix);
1360 if (usePaint) {
1362 }
1363 if (useMatrix) {
1365 }
1368 usePaint ? &
paint :
nullptr);
1369 break;
1370 }
1371 case 53: {
1378 int vertexCount;
1383 fuzz->
nextN(vertices, vertexCount);
1384 bool useTexs, useColors;
1385 fuzz->
next(&useTexs, &useColors);
1386 if (useTexs) {
1388 }
1389 if (useColors) {
1391 }
1392 int indexCount = 0;
1394 if (make_fuzz_t<bool>(fuzz)) {
1396 for (int index = 0; index < indexCount; ++index) {
1397 fuzz->
nextRange(&indices[index], 0, vertexCount - 1);
1398 }
1399 }
1401 useTexs ?
texs :
nullptr,
1402 useColors ?
colors :
nullptr,
1403 indexCount, indices),
1405 break;
1406 }
1407 case 54: {
1413 break;
1414 }
1415 case 55: {
1418 float R,
G,
B, Alpha;
1426 break;
1427 }
1428 case 56: {
1431 fuzz->
next(&p0, &p1);
1433 break;
1434 }
1435 case 57: {
1440 break;
1441 }
1442 case 58: {
1448 break;
1449 }
1450 case 59: {
1454 bool useCenter;
1457 break;
1458 }
1459 case 60: {
1465 break;
1466 }
1467 case 61: {
1474 break;
1475 }
1476 case 62: {
1481 bool useTexCoords;
1482 fuzz->
nextN(cubics, 12);
1484 fuzz->
next(&useTexCoords);
1485 if (useTexCoords) {
1486 fuzz->
nextN(texCoords, 4);
1487 }
1492 break;
1493 }
1494 default:
1496 break;
1497 }
1498 }
1499}
static sk_sp< SkPicture > make_fuzz_picture(Fuzz *, int depth)
static SkFont fuzz_font(Fuzz *fuzz)
static std::string make_fuzz_string(Fuzz *fuzz)
static void fuzz_paint(Fuzz *fuzz, SkPaint *paint, int depth)
static SkTDArray< uint8_t > make_fuzz_text(Fuzz *fuzz, const SkFont &font, SkTextEncoding encoding)
static SkTextEncoding fuzz_paint_text_encoding(Fuzz *fuzz)
static sk_sp< SkTextBlob > make_fuzz_textblob(Fuzz *fuzz)
static sk_sp< SkImage > make_fuzz_image(Fuzz *)
void FuzzNiceRRect(Fuzz *fuzz, SkRRect *rr)
void FuzzNiceMatrix(Fuzz *fuzz, SkMatrix *m)
void FuzzNicePath(Fuzz *fuzz, SkPath *path, int maxOps)
static GrDirectContext * GrAsDirectContext(GrContext_Base *base)
@ kSrcOver
r = s + (1-sa)*d
@ kLastMode
last valid value
static bool left(const SkPoint &p0, const SkPoint &p1)
constexpr size_t SkToSizeT(S x)
static SkScalar center(float pos0, float pos1)
void nextRange(T *, Min, Max)
void nextEnum(T *ptr, T max)
void nextN(T *ptr, int n)
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawOval(const SkRect &oval, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void drawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint &paint)
void drawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkBlendMode mode, const SkPaint &paint)
void drawSimpleText(const void *text, size_t byteLength, SkTextEncoding encoding, SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawImageNine(const SkImage *image, const SkIRect ¢er, const SkRect &dst, SkFilterMode filter, const SkPaint *paint=nullptr)
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
virtual GrRecordingContext * recordingContext() const
void drawPaint(const SkPaint &paint)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
int saveLayerAlpha(const SkRect *bounds, U8CPU alpha)
@ kStrict_SrcRectConstraint
sample only inside bounds; slower
@ kFast_SrcRectConstraint
sample outside bounds; faster
void clipRegion(const SkRegion &deviceRgn, SkClipOp op=SkClipOp::kIntersect)
void drawIRect(const SkIRect &rect, const SkPaint &paint)
void rotate(SkScalar degrees)
void restoreToCount(int saveCount)
void drawRRect(const SkRRect &rrect, const SkPaint &paint)
void drawRoundRect(const SkRect &rect, SkScalar rx, SkScalar ry, const SkPaint &paint)
void drawArc(const SkRect &oval, SkScalar startAngle, SkScalar sweepAngle, bool useCenter, const SkPaint &paint)
void drawImageLattice(const SkImage *image, const Lattice &lattice, const SkRect &dst, SkFilterMode filter, const SkPaint *paint=nullptr)
void clipPath(const SkPath &path, SkClipOp op, bool doAntiAlias)
void drawRegion(const SkRegion ®ion, const SkPaint &paint)
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
void drawPath(const SkPath &path, const SkPaint &paint)
void setMatrix(const SkM44 &matrix)
void drawDRRect(const SkRRect &outer, const SkRRect &inner, const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
void concat(const SkMatrix &matrix)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void drawPicture(const SkPicture *picture)
void drawVertices(const SkVertices *vertices, SkBlendMode mode, const SkPaint &paint)
@ kPolygon_PointMode
draw the array of points as a open polygon
@ kPoints_PointMode
draw each point separately
void skew(SkScalar sx, SkScalar sy)
void drawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
void clipRRect(const SkRRect &rrect, SkClipOp op, bool doAntiAlias)
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
const SkRect & getBounds() const
static sk_sp< SkVertices > MakeCopy(VertexMode mode, int vertexCount, const SkPoint positions[], const SkPoint texs[], const SkColor colors[], int indexCount, const uint16_t indices[])
@ kTriangleFan_VertexMode
unsigned useCenter Optional< SkMatrix > matrix
ClipOpAndAA opAA SkRegion region
sk_sp< SkBlender > blender SkRect rect
PODArray< SkColor > colors
static constexpr size_t kMaxCount
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 mode
font
Font Metadata and Metrics.
const SkImageFilter * fBackdrop
static SkRect Make(const SkISize &size)
bool contains(SkScalar x, SkScalar y) const