17#define SMALL SkIntToScalar(2)
20#define BIG SkIntToScalar(10)
59 paint.setAntiAlias(
true);
66 for (
int i = 0;
i < loops;
i++) {
84 name.printf(
"blurrect_direct_%.2f", rad);
136 name.printf(
"blurrect_boxfilter_%.2f", rad);
164 name.printf(
"blurrect_gaussian_%.2f", rad);
static const SkScalar kMedium
static const SkScalar kMedBig
@ kNormal_SkBlurStyle
fuzzy inside and outside
#define SkScalarRoundToInt(x)
static SkScalar SkScalarFraction(SkScalar x)
virtual void setupPaint(SkPaint *paint)
void setName(const SkString &name)
const char * onGetName() override
virtual void makeBlurryRect(const SkRect &)=0
BlurRectBench(SkScalar rad)
void onDraw(int loops, SkCanvas *) override
virtual void preBenchSetup(const SkRect &)
void makeBlurryRect(const SkRect &) override
BlurRectBoxFilterBench(SkScalar rad)
BlurRectDirectBench(SkScalar rad)
void makeBlurryRect(const SkRect &r) override
BlurRectGaussianBench(SkScalar rad)
void makeBlurryRect(const SkRect &) override
void preBenchSetup(const SkRect &r) override
BlurRectSeparableBench(SkScalar rad)
~BlurRectSeparableBench() override
static bool BlurRect(SkScalar sigma, SkMaskBuilder *dst, const SkRect &src, SkBlurStyle, SkIPoint *margin=nullptr, SkMaskBuilder::CreateMode createMode=SkMaskBuilder::kComputeBoundsAndRenderImage_CreateMode)
static SkScalar SK_SPI ConvertRadiusToSigma(SkScalar radius)
static bool BlurGroundTruth(SkScalar sigma, SkMaskBuilder *dst, const SkMask &src, SkBlurStyle, SkIPoint *margin=nullptr)
static bool BoxBlur(SkMaskBuilder *dst, const SkMask &src, SkScalar sigma, SkBlurStyle style, SkIPoint *margin=nullptr)
DEF_SWITCHES_START aot vmservice shared library name
constexpr int32_t width() const
static void FreeImage(void *image)
static uint8_t * AllocImage(size_t bytes, AllocType=kUninit_Alloc)
@ kA8_Format
8bits per pixel mask (e.g. antialiasing)
size_t computeTotalImageSize() const
void roundOut(SkIRect *dst) const
static constexpr SkRect MakeWH(float w, float h)