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

Public Member Functions

 DisplacementFullBench (bool small)
 
- Public Member Functions inherited from DisplacementBaseBench
 DisplacementBaseBench (bool small)
 
- 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 DisplacementBaseBench
void onDelayedSetup () override
 
void makeBitmap ()
 
void makeCheckerboard ()
 
void drawClippedBitmap (SkCanvas *canvas, int x, int y, const SkPaint &paint)
 
bool isSmall () const
 
- 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
}
 
- Protected Attributes inherited from DisplacementBaseBench
sk_sp< SkImagefImage
 
sk_sp< SkImagefCheckerboard
 

Detailed Description

Definition at line 138 of file DisplacementBench.cpp.

Constructor & Destructor Documentation

◆ DisplacementFullBench()

DisplacementFullBench::DisplacementFullBench ( bool  small)
inline

Definition at line 140 of file DisplacementBench.cpp.

140: INHERITED(small) { }

Member Function Documentation

◆ onDraw()

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

Implements Benchmark.

Definition at line 147 of file DisplacementBench.cpp.

147 {
150 // Displacement, with 2 non-alpha components
152 32.0f, std::move(displ), nullptr));
153 for (int i = 0; i < loops; ++i) {
154 this->drawClippedBitmap(canvas, 200, 0, paint);
155 }
156 }
sk_sp< SkImage > fCheckerboard
void drawClippedBitmap(SkCanvas *canvas, int x, int y, const SkPaint &paint)
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)
const Paint & paint
Definition: color_source.cc:38

◆ onGetName()

const char * DisplacementFullBench::onGetName ( )
inlineoverrideprotectedvirtual

Implements Benchmark.

Definition at line 143 of file DisplacementBench.cpp.

143 {
144 return isSmall() ? "displacement_full_small" : "displacement_full_large";
145 }

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