Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
InterpBench Class Referenceabstract
Inheritance diagram for InterpBench:
Benchmark SkRefCnt SkRefCntBase DoubleInterp Fixed16D16Interp Fixed16D48Interp Fixed32D32Interp FloatInterp

Public Member Functions

 InterpBench (const char name[])
 
bool isSuitableFor (Backend backend) override
 
virtual void performTest (int16_t dst[], float x, float dx, int count)=0
 
- Public Member Functions inherited from Benchmark
 Benchmark ()
 
const char * getName ()
 
const char * getUniqueName ()
 
SkISize getSize ()
 
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

virtual int mulLoopCount () const
 
const char * onGetName () override
 
void onDraw (int loops, SkCanvas *) override
 
- Protected Member Functions inherited from Benchmark
void setUnits (int units)
 
virtual void setupPaint (SkPaint *paint)
 
virtual const char * onGetUniqueName ()
 
virtual void onDelayedSetup ()
 
virtual void onPerCanvasPreDraw (SkCanvas *)
 
virtual void onPerCanvasPostDraw (SkCanvas *)
 
virtual void onPreDraw (SkCanvas *)
 
virtual void onPostDraw (SkCanvas *)
 
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 18 of file InterpBench.cpp.

Constructor & Destructor Documentation

◆ InterpBench()

InterpBench::InterpBench ( const char  name[])
inline

Definition at line 27 of file InterpBench.cpp.

27 {
28 fName.printf("interp_%s", name);
29 fFx = 3.3f;
30 fDx = 0.1257f;
31 }
void printf(const char format[],...) SK_PRINTF_LIKE(2
Definition SkString.cpp:534
const char * name
Definition fuchsia.cc:50

Member Function Documentation

◆ isSuitableFor()

bool InterpBench::isSuitableFor ( Backend  backend)
inlineoverridevirtual

Reimplemented from Benchmark.

Definition at line 33 of file InterpBench.cpp.

33 {
35 }
const char * backend

◆ mulLoopCount()

virtual int InterpBench::mulLoopCount ( ) const
inlineprotectedvirtual

Definition at line 40 of file InterpBench.cpp.

40{ return 1; }

◆ onDraw()

void InterpBench::onDraw ( int  loops,
SkCanvas  
)
inlineoverrideprotectedvirtual

Implements Benchmark.

Definition at line 46 of file InterpBench.cpp.

46 {
47 int n = loops * this->mulLoopCount();
48 for (int i = 0; i < n; i++) {
49 this->performTest(fDst, fFx, fDx, kBuffer);
50 }
51 }
virtual void performTest(int16_t dst[], float x, float dx, int count)=0
virtual int mulLoopCount() const

◆ onGetName()

const char * InterpBench::onGetName ( )
inlineoverrideprotectedvirtual

Implements Benchmark.

Definition at line 42 of file InterpBench.cpp.

42 {
43 return fName.c_str();
44 }
const char * c_str() const
Definition SkString.h:133

◆ performTest()

virtual void InterpBench::performTest ( int16_t  dst[],
float  x,
float  dx,
int  count 
)
pure virtual

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