52 (*pos)[
count - 1] = 1;
63 for (
int i = 0;
i < 9; ++
i) {
70 const std::vector<SkColor>&
colors,
71 const std::vector<SkScalar>&
pos,
80 SkDebugf(
"--- fuzzLinearGradient ---\n");
81 SkDebugf(
" pts:\t\t[ (%.9g %.9g) (%.9g %.9g) ]\n",
82 pts[0].
x(), pts[0].
y(), pts[1].
x(), pts[1].
y());
107 fuzz->
next(&pts[0].fX, &pts[0].fY, &pts[1].fX, &pts[1].fY);
108 bool useLocalMatrix, useGlobalMatrix;
109 fuzz->
next(&useLocalMatrix, &useGlobalMatrix);
111 std::vector<SkColor>
colors;
112 std::vector<SkScalar>
pos;
121 if (useLocalMatrix) {
128 if (useGlobalMatrix) {
145 bool useLocalMatrix, useGlobalMatrix;
146 fuzz->
next(&radius, &useLocalMatrix, &useGlobalMatrix);
149 std::vector<SkColor>
colors;
150 std::vector<SkScalar>
pos;
159 if (useLocalMatrix) {
166 if (useGlobalMatrix) {
183 bool useLocalMatrix, useGlobalMatrix;
184 fuzz->
next(&startRadius, &endRadius, &useLocalMatrix, &useGlobalMatrix);
186 std::vector<SkColor>
colors;
187 std::vector<SkScalar>
pos;
196 if (useLocalMatrix) {
204 if (useGlobalMatrix) {
217 bool useLocalMatrix, useGlobalMatrix;
218 fuzz->
next(&cx, &cy, &useLocalMatrix, &useGlobalMatrix);
220 std::vector<SkColor>
colors;
221 std::vector<SkScalar>
pos;
226 if (useLocalMatrix) {
240 if (useGlobalMatrix) {
265 SkDEBUGF(
"TwoPointConicalGradient\n");
static void logLinearGradient(const SkPoint pts[2], const std::vector< SkColor > &colors, const std::vector< SkScalar > &pos, SkTileMode mode, uint32_t flags, const SkMatrix *localMatrix, const SkMatrix *globalMatrix)
static DEFINE_bool2(verbose, v, false, "log verbose linear gradient description")
void fuzzLinearGradient(Fuzz *fuzz)
void initGradientParams(Fuzz *fuzz, std::vector< SkColor > *colors, std::vector< SkScalar > *pos, SkTileMode *mode)
void makeMatrix(Fuzz *fuzz, SkMatrix *m)
void fuzzTwoPointConicalGradient(Fuzz *fuzz)
DEF_FUZZ(Gradients, fuzz)
void fuzzRadialGradient(Fuzz *fuzz)
void fuzzSweepGradient(Fuzz *fuzz)
static void logOptionalMatrix(const char *label, const SkMatrix *m)
static constexpr const char * SkTileModeToStr(SkTileMode tm)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static std::vector< SkPDFIndirectReference > sort(const THashSet< SkPDFIndirectReference > &src)
static SkScalar center(float pos0, float pos1)
void nextRange(T *, Min, Max)
void nextN(T *ptr, int n)
void drawPaint(const SkPaint &paint)
void setMatrix(const SkM44 &matrix)
static sk_sp< SkShader > MakeTwoPointConical(const SkPoint &start, SkScalar startRadius, const SkPoint &end, SkScalar endRadius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
static sk_sp< SkShader > MakeSweep(SkScalar cx, SkScalar cy, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, SkScalar startAngle, SkScalar endAngle, uint32_t flags, const SkMatrix *localMatrix)
static sk_sp< SkShader > MakeRadial(const SkPoint ¢er, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
T * init(Args &&... args)
const T * getMaybeNull() const
FlutterSemanticsFlag flags
PODArray< SkColor > colors
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
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
static SkImageInfo MakeN32Premul(int width, int height)