69 center1, (pts[1].fX - pts[0].fX) / 7,
70 center0, (pts[1].fX - pts[0].fX) / 2,
78 center0.
set(pts[0].fX + radius0, pts[0].fY + radius0);
79 center1.
set(pts[1].fX - radius1, pts[1].fY - radius1);
103 return SkString(fDither ?
"gradients_no_texture" :
"gradients_no_texture_nodither");
114 paint.setAntiAlias(
true);
115 paint.setDither(fDither);
118 constexpr uint8_t kAlphas[] = { 0xff, 0x40 };
124 paint.setAlpha(kAlphas[
a]);
137 using INHERITED =
GM;
170background-
image: -webkit-
linear-gradient(
left, #22d1cd 1%, #22d1cd 0.9510157507590116%, #df4b37 2.9510157507590113%, #df4b37 23.695886056604927%, #22d1cd 25.695886056604927%, #22d1cd 25.39321881940624%, #e6de36 27.39321881940624%, #e6de36 31.849399922570655%, #3267ff 33.849399922570655%, #3267ff 44.57735802921938%, #9d47d1 46.57735802921938%, #9d47d1 53.27185850805876%, #3267ff 55.27185850805876%, #3267ff 61.95718972227316%, #5cdd9d 63.95718972227316%, #5cdd9d 69.89166004442%, #3267ff 71.89166004442%, #3267ff 74.45795382765857%, #9d47d1 76.45795382765857%, #9d47d1 82.78364610713776%, #3267ff 84.78364610713776%, #3267ff 94.52743647737229%, #e3d082 96.52743647737229%, #e3d082 96.03934633331295%);
175 0xFF22d1cd, 0xFF22d1cd, 0xFFdf4b37, 0xFFdf4b37, 0xFF22d1cd, 0xFF22d1cd, 0xFFe6de36, 0xFFe6de36,
176 0xFF3267ff, 0xFF3267ff, 0xFF9d47d1, 0xFF9d47d1, 0xFF3267ff, 0xFF3267ff, 0xFF5cdd9d, 0xFF5cdd9d,
177 0xFF3267ff, 0xFF3267ff, 0xFF9d47d1, 0xFF9d47d1, 0xFF3267ff, 0xFF3267ff, 0xFFe3d082, 0xFFe3d082
179 const double percent[] = {
180 1, 0.9510157507590116, 2.9510157507590113, 23.695886056604927,
181 25.695886056604927, 25.39321881940624, 27.39321881940624, 31.849399922570655,
182 33.849399922570655, 44.57735802921938, 46.57735802921938, 53.27185850805876,
183 55.27185850805876, 61.95718972227316, 63.95718972227316, 69.89166004442,
184 71.89166004442, 74.45795382765857, 76.45795382765857, 82.78364610713776,
185 84.78364610713776, 94.52743647737229, 96.52743647737229, 96.03934633331295,
189 for (
int i = 0;
i <
N; ++
i) {
212 for (
int i = 0;
i <
N; ++
i) {
223 0, 0, 0.5f, 0.5, 1, 1,
240 return SkString(fDither ?
"gradients_many" :
"gradients_many_nodither");
246 const Proc procs[] = {
256 paint.setDither(fDither);
260 for (
int i = 0;
i <= 8; ++
i) {
276 canvas->
scale(-1, 1);
288 using INHERITED =
GM;
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
static bool left(const SkPoint &p0, const SkPoint &p1)
#define SkScalarAve(a, b)
#define SkDoubleToScalar(x)
static SkScalar SkScalarInterp(SkScalar A, SkScalar B, SkScalar t)
static SkScalar center(float pos0, float pos1)
void onDraw(SkCanvas *canvas) override
SkString getName() const override
SkISize getISize() override
GradientsManyColorsGM(bool dither)
SkISize getISize() override
void onDraw(SkCanvas *canvas) override
GradientsNoTextureGM(bool dither)
SkString getName() const override
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
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)
GM(SkColor backgroundColor=SK_ColorWHITE)
constexpr SkColor gColors[]
constexpr GradData gGradData[]
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const GradData &data, SkTileMode tm)
static sk_sp< SkShader > MakeRadial(const SkPoint pts[2], const GradData &data, SkTileMode tm)
static void make1(ColorPos *rec)
constexpr GradMaker gGradMakers[]
static sk_sp< SkShader > Make2Conical(const SkPoint pts[2], const GradData &data, SkTileMode tm)
static sk_sp< SkShader > Make2Radial(const SkPoint pts[2], const GradData &data, SkTileMode tm)
static void make2(ColorPos *rec)
sk_sp< SkShader >(* GradMaker)(const SkPoint pts[2], const GradData &data, SkTileMode tm)
static void make3(ColorPos *rec)
static sk_sp< SkShader > MakeSweep(const SkPoint pts[2], const GradData &data, SkTileMode)
static void make0(ColorPos *rec)
sk_sp< const SkImage > image
PODArray< SkColor > colors
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 constexpr SkPoint kPts[kPtsCount]
void construct(const SkColor colors[], const SkScalar pos[], int count)
static constexpr SkISize Make(int32_t w, int32_t h)
void set(float x, float y)
SkRect makeOutset(float dx, float dy) const
constexpr float centerX() const
constexpr float height() const
constexpr float width() const
static constexpr SkRect MakeWH(float w, float h)
std::shared_ptr< const fml::Mapping > data
static sk_sp< SkShader > linear(sk_sp< SkShader > shader)