38 const SkPoint kPts0[] = { { 0, 0 }, {
s,
s } };
39 const SkPoint kPts1[] = { {
s/2, 0 }, {
s/2,
s } };
41 const SkColor kColors0[] = {0x80F00080, 0xF0F08000, 0x800080F0 };
42 const SkColor kColors1[] = {0xF08000F0, 0x8080F000, 0xF000F080 };
96 canvas->
scale(2.f, 2.f);
108 for (
size_t tm0 = 0; tm0 <
std::size(kTileModes); ++tm0) {
109 for (
size_t tm1 = 0; tm1 <
std::size(kTileModes); ++tm1) {
120 constexpr char kText[] =
"B";
138 using INHERITED =
GM;
143DEF_GM(
return new ShaderText3GM; )
constexpr SkColor SK_ColorTRANSPARENT
@ kUTF8
uses bytes to represent UTF-8 or ASCII
sk_sp< SkImage > asImage() const
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
void allocN32Pixels(int width, int height, bool isOpaque=false)
void eraseColor(SkColor4f) const
void translate(SkScalar dx, SkScalar dy)
void drawPaint(const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
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)
SkMatrix & postRotate(SkScalar degrees, SkScalar px, SkScalar py)
SkMatrix & postScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
SkMatrix & setTranslate(SkScalar dx, SkScalar dy)
void setStyle(Style style)
void setAntiAlias(bool aa)
@ kStroke_Style
set to stroke geometry
void setShader(sk_sp< SkShader > shader)
void setStrokeWidth(SkScalar width)
GM(SkColor backgroundColor=SK_ColorWHITE)
SkISize getISize() override
SkString getName() const override
void onDraw(SkCanvas *canvas) override
void onOnceBeforeDraw() override
static float min(float r, float g, float b)
SkSamplingOptions sampling
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
font
Font Metadata and Metrics.
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
static void makebm(SkBitmap *bm, int w, int h)
static constexpr SkISize Make(int32_t w, int32_t h)