39 const SkPoint pt = { wScalar / 2, hScalar / 2 };
60 for (
int i = 0;
i < 4; ++
i) {
68 rect.inset(wScalar / 8, hScalar / 8);
71 return surface->makeImageSnapshot();
82 fName.
set(
"drawminibitmaprect");
94 if (
nullptr == fImage) {
101 constexpr int kPadX = 30;
102 constexpr int kPadY = 40;
110 paint.setAntiAlias(fAA);
111 for (
int w = 1;
w <= kMaxSrcRectSize;
w *= 3) {
112 for (
int h = 1;
h <= kMaxSrcRectSize;
h *= 3) {
117 switch (random.
nextU() % 3) {
135 if ((dstRect.
width() + 2 * kPadX) * rowCount >
gSize) {
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
static int SkNextLog2(uint32_t value)
SkString getName() const override
SkISize getISize() override
DrawMiniBitmapRectGM(bool antiAlias)
void onDraw(SkCanvas *canvas) override
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
@ kFast_SrcRectConstraint
sample outside bounds; faster
void rotate(SkScalar degrees)
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
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 & postScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
static const SkMatrix & I()
void set(const SkString &src)
void void void appendf(const char format[],...) SK_PRINTF_LIKE(2
constexpr int gSurfaceSize
static sk_sp< SkImage > makebm(int w, int h)
static float max(float r, float g, float b)
sk_sp< SkBlender > blender SkRect rect
PODArray< SkColor > colors
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
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 SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo MakeN32Premul(int width, int height)
static SkRect Make(const SkISize &size)
constexpr float height() const
constexpr float width() const
static constexpr SkRect MakeWH(float w, float h)