35#define RESIZE_FACTOR_X SkIntToScalar(2)
36#define RESIZE_FACTOR_Y SkIntToScalar(5)
44 canvas->
clear(0x00000000);
52 return surface->makeImageSnapshot();
59 paint.setImageFilter(std::move(filter));
60 paint.setAntiAlias(
true);
121 bounds.outset(margin, margin);
124 for (
int xOffset = 0; xOffset < 80; xOffset += 16) {
139 for (
int xOffset = 0; xOffset < 80; xOffset += 16) {
149 using INHERITED =
GM;
154DEF_GM(
return new ImageFiltersClippedGM;)
162 p.setImageFilter(std::move(filter));
163 canvas->drawImage(reference, 0, 0, {}, &
p);
164 canvas->translate(0, reference->
height());
168 float kernel[] = {1.f, 1.f, 1.f,
172 {3, 3}, kernel, 1.f, 0.3f, {1, 1},
SkTileMode::kClamp,
true,
nullptr, crop));
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
#define SkScalarInvert(x)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
void clear(SkColor color)
void scale(SkScalar sx, SkScalar sy)
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
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< SkImageFilter > PointLitDiffuse(const SkPoint3 &location, SkColor lightColor, SkScalar surfaceScale, SkScalar kd, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > MatrixConvolution(const SkISize &kernelSize, const SkScalar kernel[], SkScalar gain, SkScalar bias, const SkIPoint &kernelOffset, SkTileMode tileMode, bool convolveAlpha, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
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 > Erode(SkScalar radiusX, SkScalar radiusY, 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 > DisplacementMap(SkColorChannel xChannelSelector, SkColorChannel yChannelSelector, SkScalar scale, sk_sp< SkImageFilter > displacement, sk_sp< SkImageFilter > color, 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 > 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 > Shader(sk_sp< SkShader > shader, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Dilate(SkScalar radiusX, SkScalar radiusY, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
SkISize dimensions() const
SkMatrix & setScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
GM(SkColor backgroundColor=SK_ColorWHITE)
void onDraw(SkCanvas *canvas) override
SkISize getISize() override
void onOnceBeforeDraw() override
SkString getName() const override
static float min(float r, float g, float b)
static sk_sp< SkImage > make_gradient_circle(int width, int height)
DEF_SIMPLE_GM(imagefilter_convolve_subset, canvas, 160, 180)
static void draw_clipped_filter(SkCanvas *canvas, sk_sp< SkImageFilter > filter, size_t i, const SkRect &primBounds, const SkRect &clipBounds)
Optional< SkRect > bounds
PODArray< SkColor > colors
SK_API sk_sp< SkShader > MakeFractalNoise(SkScalar baseFrequencyX, SkScalar baseFrequencyY, int numOctaves, SkScalar seed, const SkISize *tileSize=nullptr)
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
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
SkSamplingOptions(SkFilterMode::kLinear))
static sk_sp< SkImage > make_gradient_circle(int width, int height)
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo MakeN32Premul(int width, int height)
static SkPoint3 Make(SkScalar x, SkScalar y, SkScalar z)
static constexpr SkPoint Make(float x, float y)
static SkRect Make(const SkISize &size)
SkRect makeInset(float dx, float dy) const
constexpr float centerX() const
constexpr float height() const
constexpr float centerY() const
constexpr float width() const
static constexpr SkRect MakeWH(float w, float h)
static void checkerboard(SkCanvas *canvas, SkColor c1, SkColor c2, int size)