64 inner.
inset(xRad, yRad);
100 p.setImageFilter(std::move(filter));
108 scale.setScale(2.0f, 2.0f);
189 canvas->
scale(1.5f, 1.5f);
191 const SkRect& fastBound =
p.computeFastBounds(r, &storage);
195 (*draw)(canvas, r,
p);
199 canvas->
drawRect(fastBound, blueStroked);
220 canvas->
scale(1.5f, 1.5f);
222 const SkRect& fastBound =
p.computeFastBounds(
bounds, &storage);
228 canvas->
drawRect(fastBound, blueStroked);
282 for (
int i = 1;
i < paints.
size(); ++
i) {
299 for (
int i = 0;
i < pifPaints.
size(); ++
i) {
301 canvas, pifPaints[
i]);
305 for (
int i = 0;
i < pifPaints.
size(); ++
i) {
307 canvas, bmsPaints[
i]);
312 for (
int j = 0; j < paints.
size(); ++j) {
322 using INHERITED =
GM;
327DEF_GM(
return new ImageFilterFastBoundGM;)
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
sk_sp< SkImage > asImage() 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 drawOval(const SkRect &oval, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void drawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
void clear(SkColor color)
void drawRRect(const SkRRect &rrect, const SkPaint &paint)
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
void drawPath(const SkPath &path, const SkPaint &paint)
void drawDRRect(const SkRRect &outer, const SkRRect &inner, const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
@ kLines_PointMode
draw each pair of points as a line segment
static sk_sp< SkImageFilter > DropShadow(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor color, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > DropShadowOnly(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor color, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Blur(SkScalar sigmaX, SkScalar sigmaY, SkTileMode tileMode, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Image(sk_sp< SkImage > image, const SkRect &srcRect, const SkRect &dstRect, const SkSamplingOptions &sampling)
static sk_sp< SkImageFilter > Picture(sk_sp< SkPicture > pic, const SkRect &targetRect)
static sk_sp< SkImageFilter > MatrixTransform(const SkMatrix &matrix, const SkSamplingOptions &sampling, sk_sp< SkImageFilter > input)
static sk_sp< SkImageFilter > Offset(SkScalar dx, SkScalar dy, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Tile(const SkRect &src, const SkRect &dst, sk_sp< SkImageFilter > input)
SkMatrix & setRotate(SkScalar degrees, SkScalar px, SkScalar py)
void setStyle(Style style)
void setColor(SkColor color)
@ kStroke_Style
set to stroke geometry
static SkPath Polygon(const SkPoint pts[], int count, bool isClosed, SkPathFillType=SkPathFillType::kWinding, bool isVolatile=false)
SkCanvas * beginRecording(const SkRect &bounds, sk_sp< SkBBoxHierarchy > bbh)
sk_sp< SkPicture > finishRecordingAsPicture()
void inset(SkScalar dx, SkScalar dy, SkRRect *dst) const
void setRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
GM(SkColor backgroundColor=SK_ColorWHITE)
DrawResult draw(SkCanvas *canvas)
void onDraw(SkCanvas *canvas) override
static constexpr int kTileWidth
static constexpr int kNumXtraCols
static constexpr int kNumVertTiles
static constexpr int kTileHeight
SkString getName() const override
static void draw_savelayer_with_paint(const SkIPoint &off, SkCanvas *canvas, const SkPaint &p)
static void draw_geom_with_paint(drawMth draw, const SkIPoint &off, SkCanvas *canvas, const SkPaint &p)
SkISize getISize() override
Optional< SkRect > bounds
sk_sp< const SkImage > image
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 void draw_oval(SkCanvas *canvas, const SkRect &r, const SkPaint &p)
static void draw_drrect(SkCanvas *canvas, const SkRect &r, const SkPaint &p)
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
static void draw_bitmap(SkCanvas *canvas, const SkRect &r, const SkPaint &p)
static void create_paints(TArray< SkPaint > *paints, sk_sp< SkImageFilter > source)
static void draw_rect(SkCanvas *canvas, const SkRect &r, const SkPaint &p)
static void add_paint(TArray< SkPaint > *paints, sk_sp< SkImageFilter > filter)
static SkPath scale(const SkPath &path, SkScalar scale)
SkSamplingOptions(SkFilterMode::kLinear))
static void draw_rrect(SkCanvas *canvas, const SkRect &r, const SkPaint &p)
constexpr drawMth gDrawMthds[]
void(* drawMth)(SkCanvas *canvas, const SkRect &r, const SkPaint &p)
static void draw_points(SkCanvas *canvas, const SkRect &r, const SkPaint &p)
static void draw_path(SkCanvas *canvas, const SkRect &r, const SkPaint &p)
static constexpr SkIPoint Make(int32_t x, int32_t y)
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo MakeN32Premul(int width, int height)
SkScalar fBottom
larger y-axis bounds
SkScalar fLeft
smaller x-axis bounds
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
SkScalar fRight
larger x-axis bounds
constexpr float height() const
constexpr float width() const
static constexpr SkRect MakeWH(float w, float h)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
SkScalar fTop
smaller y-axis bounds