44 for (
int i = 0;
i < 8; ++
i) {
47 this->drawVertRects(canvas, white);
50 this->drawVertRects(canvas, green);
55 this->drawHorizRects(canvas, white);
58 this->drawHorizRects(canvas, green);
64 this->drawSquares(canvas, white);
67 this->drawSquares(canvas, green);
74 constexpr SkRect vertRects[] = {
79 { 21, 1, 21.25f, 21 },
80 { 25, 1, 25.125f, 21 },
84 static constexpr SkVector radii[4] = {{1/32.f, 2/32.f}, {3/32.f, 1/32.f}, {2/32.f, 3/32.f},
87 for (
size_t j = 0; j <
std::size(vertRects); ++j) {
98 constexpr SkRect horizRects[] = {
101 { 1, 13, 21, 14.0f },
102 { 1, 17, 21, 17.5f },
103 { 1, 21, 21, 21.25f },
104 { 1, 25, 21, 25.125f },
109 for (
size_t j = 0; j <
std::size(horizRects); ++j) {
120 constexpr SkRect squares[] = {
121 { 1, 1, 5.0f, 5.0f },
122 { 8, 8, 10.0f, 10.0f },
123 { 13, 13, 14.0f, 14.0f },
124 { 17, 17, 17.5f, 17.5f },
125 { 21, 21, 21.25f, 21.25f },
126 { 25, 25, 25.125f, 25.125f },
127 { 29, 29, 29.0f, 29.0f }
131 for (
size_t j = 0; j <
std::size(squares); ++j) {
143 using INHERITED =
GM;
148DEF_GM(
return new ThinRectsGM(
false); )
149DEF_GM(
return new ThinRectsGM(
true); )
156 errorMsg->printf(
"makeSurface not supported");
159 auto zoomedCanvas = zoomed->getCanvas();
163 p.setAntiAlias(
true);
165 zoomedCanvas->save();
168 zoomedCanvas->restore();
172 auto img = zoomed->makeImageSnapshot();
static void round(SkPoint *p)
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
sk_sp< SkSurface > makeSurface(const SkImageInfo &info, const SkSurfaceProps *props=nullptr)
void drawRRect(const SkRRect &rrect, const SkPaint &paint)
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
SkImageInfo imageInfo() const
void setColor(SkColor color)
void setAntiAlias(bool aa)
@ kFill_Style
set to fill geometry
void setRectRadii(const SkRect &rect, const SkVector radii[4])
void setRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
void setNinePatch(const SkRect &rect, SkScalar leftRad, SkScalar topRad, SkScalar rightRad, SkScalar bottomRad)
GM(SkColor backgroundColor=SK_ColorWHITE)
void onDraw(SkCanvas *canvas) override
SkISize getISize() override
SkString getName() const override
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
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)
SkImageInfo makeWH(int newWidth, int newHeight) const
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
DEF_SIMPLE_GM_CAN_FAIL(clipped_thinrect, canvas, errorMsg, 256, 256)