48 paint.setDither(
true);
67 : fPowerOfTwoSize(powerOfTwoSize) {
78 if (!fPowerOfTwoSize) {
103 const char* gColorTypeNames[] = {
"8888",
"565" };
105 const char* gFilterNames[] = {
"Nearest",
"Linear",
"Trilinear",
"Mitchell",
"Aniso" };
109 const char* gModeNames[] = {
"C",
"R",
"M" };
117 str.
printf(
"[%s,%s]", gModeNames[kx], gModeNames[ky]);
136 if (!fPowerOfTwoSize) {
141 paint.setDither(
true);
161 bool fPowerOfTwoSize;
207 void onDraw(
SkCanvas* canvas)
override {
217 const char* gModeNames[] = {
218 "Clamp",
"Repeat",
"Mirror"
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
constexpr SkColor SK_ColorTRANSPARENT
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
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)
constexpr SkBlendMode gModes[]
ScaledTiling2GM(ShaderProc proc, const char name[])
void onDraw(SkCanvas *canvas) override
SkString getName() const override
ScaledTilingGM(bool powerOfTwoSize)
void onOnceBeforeDraw() override
static constexpr int kPOTSize
SkBitmap fTexture[std::size(gColorTypes)]
SkISize getISize() override
static constexpr int kNPOTSize
void allocPixels(const SkImageInfo &info, size_t rowBytes)
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
void eraseColor(SkColor4f) const
void drawRect(const SkRect &rect, const SkPaint &paint)
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)
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 printf(const char format[],...) SK_PRINTF_LIKE(2
const char * c_str() const
static void DrawString(SkCanvas *canvas, const char text[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint, Align align=kLeft_Align)
PODArray< SkColor > colors
SkSamplingOptions sampling
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
font
Font Metadata and Metrics.
SkSamplingOptions(SkFilterMode::kLinear))
static constexpr SkCubicResampler Mitchell()
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
constexpr float height() const
constexpr float width() const
static constexpr SkSamplingOptions Aniso(int maxAniso)
static sk_sp< SkShader > make_grad(SkTileMode tx, SkTileMode ty)
static void makebm(SkBitmap *bm, SkColorType ct, int w, int h)
static sk_sp< SkShader > make_bm(SkTileMode tx, SkTileMode ty)
constexpr SkColorType gColorTypes[]
static void setup(SkPaint *paint, const SkBitmap &bm, const SkSamplingOptions &sampling, SkTileMode tmx, SkTileMode tmy)
const SkSamplingOptions gSamplings[]
sk_sp< SkShader >(* ShaderProc)(SkTileMode, SkTileMode)