Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
M4Bench Class Referenceabstract
Inheritance diagram for M4Bench:
Benchmark SkRefCnt SkRefCntBase M4Concat M4EQ M4NEQ M4SetConcat M4_map2 M4_map4

Public Member Functions

 M4Bench (const char name[])
 
bool isSuitableFor (Backend backend) override
 
virtual void performTest ()=0
 
- 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

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

Protected Attributes

SkM44 fM0
 
SkM44 fM1
 
SkM44 fM2
 

Additional Inherited Members

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

Detailed Description

Definition at line 14 of file Matrix44Bench.cpp.

Constructor & Destructor Documentation

◆ M4Bench()

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

Definition at line 17 of file Matrix44Bench.cpp.

17 {
18 fName.printf("m4_%s", name);
19
20 SkRandom rand;
21 float value[32];
22 for (auto& v : value) {
23 v = rand.nextF();
24 }
27 }
static SkM44 ColMajor(const SkScalar c[16])
Definition: SkM44.h:218
float nextF()
Definition: SkRandom.h:55
void printf(const char format[],...) SK_PRINTF_LIKE(2
Definition: SkString.cpp:534
uint8_t value
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32

Member Function Documentation

◆ isSuitableFor()

bool M4Bench::isSuitableFor ( Backend  backend)
inlineoverridevirtual

Reimplemented from Benchmark.

Definition at line 29 of file Matrix44Bench.cpp.

29 {
31 }
const char * backend

◆ mulLoopCount()

virtual int M4Bench::mulLoopCount ( ) const
inlineprotectedvirtual

Definition at line 38 of file Matrix44Bench.cpp.

38{ return 1; }

◆ onDraw()

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

Implements Benchmark.

Definition at line 44 of file Matrix44Bench.cpp.

44 {
45 for (int i = 0; i < loops; i++) {
46 this->performTest();
47 }
48 }
virtual void performTest()=0

◆ onGetName()

const char * M4Bench::onGetName ( )
inlineoverrideprotectedvirtual

Implements Benchmark.

Definition at line 40 of file Matrix44Bench.cpp.

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

◆ performTest()

virtual void M4Bench::performTest ( )
pure virtual

Implemented in M4NEQ, M4EQ, M4Concat, M4SetConcat, M4_map4, and M4_map2.

Member Data Documentation

◆ fM0

SkM44 M4Bench::fM0
protected

Definition at line 36 of file Matrix44Bench.cpp.

◆ fM1

SkM44 M4Bench::fM1
protected

Definition at line 36 of file Matrix44Bench.cpp.

◆ fM2

SkM44 M4Bench::fM2
protected

Definition at line 36 of file Matrix44Bench.cpp.


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