57 constexpr SkColor kSolidColors[] = {
63 constexpr SkColor kBmpAlphas[] = {
68 auto tempSurface(this->makeTempSurface(canvas, kSize, kSize));
83 for (
size_t c = 0; c <
std::size(kSolidColors); ++c) {
90 this->drawMode(canvas,
x,
y, kSize, kSize, modePaint, tempSurface.get());
94 if (!(
test % kTestsPerRow)) {
107 this->drawMode(canvas,
x,
y, kSize, kSize, modePaint, tempSurface.get());
111 if (!(
test % kTestsPerRow)) {
136 int x,
int y,
int w,
int h,
149 modeCanvas =
surface->getCanvas();
157 modeCanvas =
nullptr;
173 void onOnceBeforeDraw()
override {
174 const uint32_t kCheckData[] = {
182 memcpy(bg.
getPixels(), kCheckData,
sizeof(kCheckData));
205 bmpCanvas.drawRect(
rect, bmpPaint);
219 using INHERITED =
GM;
224DEF_GM(
return new Xfermodes3GM;)
SkStrokeRec::Style fStyle
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
SK_API const char * SkBlendMode_Name(SkBlendMode blendMode)
static constexpr int kSkBlendModeCount
static SkPMColor SkPackARGB32(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
constexpr SkColor SK_ColorTRANSPARENT
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorWHITE
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
void allocN32Pixels(int width, int height, bool isOpaque=false)
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
sk_sp< SkSurface > makeSurface(const SkImageInfo &info, const SkSurfaceProps *props=nullptr)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
SkImageInfo imageInfo() const
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)
SkMatrix & setScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
void setStyle(Style style)
void setColor(SkColor color)
void setAntiAlias(bool aa)
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
void setShader(sk_sp< SkShader > shader)
void setBlendMode(SkBlendMode mode)
void setStrokeWidth(SkScalar width)
GM(SkColor backgroundColor=SK_ColorWHITE)
SkString getName() const override
SkISize getISize() override
void onDraw(SkCanvas *canvas) override
sk_sp< SkBlender > blender SkRect rect
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 mode
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)
SkSamplingOptions(SkFilterMode::kLinear))
static constexpr SkISize Make(int32_t w, int32_t h)
sk_sp< SkColorSpace > refColorSpace() const
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
SkAlphaType alphaType() const
SkColorType colorType() const
void inset(float dx, float dy)
static constexpr SkRect MakeWH(float w, float h)