Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | List of all members
BlurRectDirectBench Class Reference
Inheritance diagram for BlurRectDirectBench:
BlurRectBench Benchmark SkRefCnt SkRefCntBase

Public Member Functions

 BlurRectDirectBench (SkScalar rad)
 
- Public Member Functions inherited from BlurRectBench
 BlurRectBench (SkScalar rad)
 
- Public Member Functions inherited from Benchmark
 Benchmark ()
 
const char * getName ()
 
const char * getUniqueName ()
 
SkISize getSize ()
 
virtual bool isSuitableFor (Backend backend)
 
virtual void modifyGrContextOptions (GrContextOptions *)
 
virtual bool shouldLoop () const
 
void delayedSetup ()
 
void perCanvasPreDraw (SkCanvas *)
 
void perCanvasPostDraw (SkCanvas *)
 
void preDraw (SkCanvas *)
 
void postDraw (SkCanvas *)
 
void draw (int loops, SkCanvas *)
 
virtual void getGpuStats (SkCanvas *, skia_private::TArray< SkString > *keys, skia_private::TArray< double > *values)
 
virtual bool getDMSAAStats (GrRecordingContext *)
 
int getUnits () const
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Protected Member Functions

void makeBlurryRect (const SkRect &r) override
 
- Protected Member Functions inherited from BlurRectBench
const char * onGetName () override
 
SkScalar radius () const
 
void setName (const SkString &name)
 
void onDraw (int loops, SkCanvas *) override
 
virtual void makeBlurryRect (const SkRect &)=0
 
virtual void preBenchSetup (const SkRect &)
 
- Protected Member Functions inherited from Benchmark
void setUnits (int units)
 
virtual void setupPaint (SkPaint *paint)
 
virtual const char * onGetName ()=0
 
virtual const char * onGetUniqueName ()
 
virtual void onDelayedSetup ()
 
virtual void onPerCanvasPreDraw (SkCanvas *)
 
virtual void onPerCanvasPostDraw (SkCanvas *)
 
virtual void onPreDraw (SkCanvas *)
 
virtual void onPostDraw (SkCanvas *)
 
virtual void onDraw (int loops, SkCanvas *)=0
 
virtual SkISize onGetSize ()
 

Additional Inherited Members

- Public Types inherited from Benchmark
enum class  Backend {
  kNonRendering , kRaster , kGanesh , kGraphite ,
  kPDF , kHWUI
}
 

Detailed Description

Definition at line 78 of file BlurRectBench.cpp.

Constructor & Destructor Documentation

◆ BlurRectDirectBench()

BlurRectDirectBench::BlurRectDirectBench ( SkScalar  rad)
inline

Definition at line 80 of file BlurRectBench.cpp.

80 : INHERITED(rad) {
82
83 if (SkScalarFraction(rad) != 0) {
84 name.printf("blurrect_direct_%.2f", rad);
85 } else {
86 name.printf("blurrect_direct_%d", SkScalarRoundToInt(rad));
87 }
88
89 this->setName(name);
90 }
#define SkScalarRoundToInt(x)
Definition: SkScalar.h:37
static SkScalar SkScalarFraction(SkScalar x)
Definition: SkScalar.h:67
void setName(const SkString &name)
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32

Member Function Documentation

◆ makeBlurryRect()

void BlurRectDirectBench::makeBlurryRect ( const SkRect r)
inlineoverrideprotectedvirtual

Implements BlurRectBench.

Definition at line 92 of file BlurRectBench.cpp.

92 {
93 SkMaskBuilder mask;
95 &mask, r, kNormal_SkBlurStyle)) {
96 return;
97 }
99 }
@ kNormal_SkBlurStyle
fuzzy inside and outside
Definition: SkBlurTypes.h:12
SkScalar radius() const
static bool BlurRect(SkScalar sigma, SkMaskBuilder *dst, const SkRect &src, SkBlurStyle, SkIPoint *margin=nullptr, SkMaskBuilder::CreateMode createMode=SkMaskBuilder::kComputeBoundsAndRenderImage_CreateMode)
Definition: SkBlurMask.cpp:407
static SkScalar SK_SPI ConvertRadiusToSigma(SkScalar radius)
Definition: SkBlurMask.cpp:39
static void FreeImage(void *image)
Definition: SkMask.cpp:57
uint8_t *& image()
Definition: SkMask.h:236

The documentation for this class was generated from the following file: