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

Public Member Functions

 ImageFilterDisplacedBlur ()
 
- 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

const char * onGetName () override
 
void onDraw (int loops, SkCanvas *canvas) override
 
- 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 124 of file ImageFilterDAGBench.cpp.

Constructor & Destructor Documentation

◆ ImageFilterDisplacedBlur()

ImageFilterDisplacedBlur::ImageFilterDisplacedBlur ( )
inline

Definition at line 126 of file ImageFilterDAGBench.cpp.

126{}

Member Function Documentation

◆ onDraw()

void ImageFilterDisplacedBlur::onDraw ( int  loops,
SkCanvas canvas 
)
inlineoverrideprotectedvirtual

Implements Benchmark.

Definition at line 133 of file ImageFilterDAGBench.cpp.

133 {
134 // Setup filter once
135 sk_sp<SkImageFilter> blur(SkImageFilters::Blur(4.0f, 4.0f, nullptr));
136 SkScalar scale = 2;
137
140 scale, blur, blur));
141
143
144 // As before, measure just the filter computation time inside the loops
145 for (int j = 0; j < loops; j++) {
146 canvas->drawRect(rect, paint);
147 }
148 }
void drawRect(const SkRect &rect, const SkPaint &paint)
Definition: SkCanvas.cpp:1673
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={})
const Paint & paint
Definition: color_source.cc:38
float SkScalar
Definition: extension.cpp:12
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350
const Scalar scale
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
Definition: SkRect.h:56
static SkRect Make(const SkISize &size)
Definition: SkRect.h:669

◆ onGetName()

const char * ImageFilterDisplacedBlur::onGetName ( )
inlineoverrideprotectedvirtual

Implements Benchmark.

Definition at line 129 of file ImageFilterDAGBench.cpp.

129 {
130 return "image_filter_displaced_blur";
131 }

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