45 { 50,
gColors,
nullptr,
"_hicolor" },
46 { 3,
gColors,
nullptr,
"_3color" },
84 center0, (pts[1].fX - pts[0].fX) / 2,
97 center0, (pts[1].fX - pts[0].fX) / 2,
107 center0.
set(pts[0].fX + radius0, pts[0].fY + radius0);
108 center1.
set(pts[1].fX - radius1, pts[1].fY - radius1);
121 center0.
set(pts[0].fX + radius0, pts[0].fY + radius0);
122 center1.
set(pts[1].fX - radius1, pts[1].fY - radius1);
181 : fGeomType(geomType) {
203 fName.
printf(
"gradient_%s_%s",
gGrads[gradType].fName, tmname);
207 fName.appendf(
"_dither");
217 return fName.
c_str();
227 for (
int i = 0;
i < loops;
i++) {
252 static const int kSize = 400;
317 fName.printf(
"gradient_create_%s", hasAlpha ?
"alpha" :
"opaque");
318 fHasAlpha = hasAlpha;
323 return fName.c_str();
328 this->setupPaint(&
paint);
336 for (
int i = 0;
i < loops;
i++) {
337 const int gray =
i % 256;
338 const int alpha = fHasAlpha ? gray : 0xFF;
static sk_sp< SkShader > MakeConical(const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale)
Ignores scale.
static const GradData gGradData[]
static const char * geomtypename(GeomType gt)
static const struct @224 gGrads[]
static sk_sp< SkShader > MakeSweep(const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale)
Ignores scale.
static const SkColor gShallowColors[]
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale)
Ignores scale.
static sk_sp< SkShader > MakeConicalZeroRad(const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale)
Ignores scale.
@ kConicalOutZero_GradType
sk_sp< SkShader >(* GradMaker)(const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale)
static sk_sp< SkShader > MakeConicalOutside(const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale)
Ignores scale.
static sk_sp< SkShader > MakeRadial(const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale)
static const SkScalar gPos[]
static const SkColor gColors[]
static sk_sp< SkShader > MakeConicalOutsideZeroRad(const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale)
Ignores scale.
#define SkDEBUGFAIL(message)
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
#define INHERITED(method,...)
#define SkScalarAve(a, b)
static SkScalar SkScalarInterp(SkScalar A, SkScalar B, SkScalar t)
static SkScalar center(float pos0, float pos1)
virtual void setupPaint(SkPaint *paint)
Gradient2Bench(bool hasAlpha)
const char * onGetName() override
void onDraw(int loops, SkCanvas *canvas) override
GradientBench(GradType gradType, GradData data, bool dither)
SkISize onGetSize() override
GradientBench(GradType gradType, GradData data=gGradData[0], SkTileMode tm=SkTileMode::kClamp, GeomType geomType=kRect_GeomType, float scale=1.0f)
const char * onGetName() override
void onDraw(int loops, SkCanvas *canvas) override
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawOval(const SkRect &oval, 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)
void setDither(bool dither)
void setShader(sk_sp< SkShader > shader)
void printf(const char format[],...) SK_PRINTF_LIKE(2
const char * c_str() const
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 SkISize Make(int32_t w, int32_t h)
void set(float x, float y)
static SkRect MakeIWH(int w, int h)
std::shared_ptr< const fml::Mapping > data