48 : fProc(proc), fName(
name), fDither(dither) {}
56 return SkStringPrintf(
"shallow_gradient_%s%s", fName, fDither ?
"" :
"_nodither");
59 SkISize getISize()
override {
return {800, 800}; }
61 void onDraw(
SkCanvas* canvas)
override {
70 paint.setDither(fDither);
77#define M(PROC, DITHER) DEF_GM( return new ShallowGradientGM(shader_ ## PROC, #PROC, DITHER); )
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
static SkScalar center(float pos0, float pos1)
ShallowGradientGM(MakeShaderProc proc, const char name[], bool dither)
void drawRect(const SkRect &rect, const SkPaint &paint)
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)
PODArray< SkColor > colors
DEF_SWITCHES_START aot vmservice shared library name
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
static sk_sp< SkShader > shader_linear(const SkColor colors[], int count, const SkSize &size)
static sk_sp< SkShader > shader_conical(const SkColor colors[], int count, const SkSize &size)
static sk_sp< SkShader > shader_radial(const SkColor colors[], int count, const SkSize &size)
static sk_sp< SkShader > shader_sweep(const SkColor colors[], int count, const SkSize &size)
sk_sp< SkShader >(* MakeShaderProc)(const SkColor[], int count, const SkSize &)
constexpr float height() const
constexpr float width() const
static constexpr SkSize Make(SkScalar w, SkScalar h)
static sk_sp< SkShader > linear(sk_sp< SkShader > shader)