24#include <initializer_list>
32 paint.setAntiAlias(
true);
41 return surface->makeImageSnapshot();
47 paint.setImageFilter(std::move(filter));
78 for (
auto sigma: { 0.6f, 3.0f, 8.0f, 20.0f }) {
106 using INHERITED =
GM;
111DEF_GM(
return new ImageBlurClampModeGM;)
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void clipIRect(const SkIRect &irect, SkClipOp op=SkClipOp::kIntersect)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
static sk_sp< SkImageFilter > Blur(SkScalar sigmaX, SkScalar sigmaY, SkTileMode tileMode, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
GM(SkColor backgroundColor=SK_ColorWHITE)
SkString getName() const override
SkISize getISize() override
bool runAsBench() const override
void onDraw(SkCanvas *canvas) override
static void draw_image(SkCanvas *canvas, const sk_sp< SkImage > image, sk_sp< SkImageFilter > filter)
static sk_sp< SkImage > make_image(SkCanvas *canvas)
sk_sp< const SkImage > image
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
SkSamplingOptions(SkFilterMode::kLinear))
static sk_sp< SkImage > make_image(SkColorType colorType, SkAlphaType alphaType)
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo MakeN32Premul(int width, int height)
static SkRect MakeIWH(int w, int h)