Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
Sk4fRoundtripBench< T > Struct Template Reference
Inheritance diagram for Sk4fRoundtripBench< T >:
Benchmark SkRefCnt SkRefCntBase

Public Member Functions

 Sk4fRoundtripBench ()
 
const char * onGetName () override
 
bool isSuitableFor (Backend backend) override
 
void onDraw (int loops, SkCanvas *canvas) override
 
- 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
 

Additional Inherited Members

- Public Types inherited from Benchmark
enum class  Backend {
  kNonRendering , kRaster , kGanesh , kGraphite ,
  kPDF , kHWUI
}
 
- 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 ()
 

Detailed Description

template<typename T>
struct Sk4fRoundtripBench< T >

Definition at line 16 of file Sk4fBench.cpp.

Constructor & Destructor Documentation

◆ Sk4fRoundtripBench()

template<typename T >
Sk4fRoundtripBench< T >::Sk4fRoundtripBench ( )
inline

Definition at line 17 of file Sk4fBench.cpp.

17{}

Member Function Documentation

◆ isSuitableFor()

template<typename T >
bool Sk4fRoundtripBench< T >::isSuitableFor ( Backend  backend)
inlineoverridevirtual

Reimplemented from Benchmark.

Definition at line 29 of file Sk4fBench.cpp.

const char * backend

◆ onDraw()

template<typename T >
void Sk4fRoundtripBench< T >::onDraw ( int  loops,
SkCanvas canvas 
)
inlineoverridevirtual

Implements Benchmark.

Definition at line 31 of file Sk4fBench.cpp.

31 {
32 skvx::float4 fs(1,2,3,4);
33 while (loops --> 0) {
34 fs = skvx::cast<float>(skvx::cast<T>(fs));
35 }
36 fs.store(const_cast<float*>(blackhole));
37 }
static volatile float blackhole[4]
Definition: Sk4fBench.cpp:13
Definition: SkVx.h:83

◆ onGetName()

template<typename T >
const char * Sk4fRoundtripBench< T >::onGetName ( )
inlineoverridevirtual

Implements Benchmark.

Definition at line 19 of file Sk4fBench.cpp.

19 {
20 switch (sizeof(T)) {
21 case 1: return "Sk4f_roundtrip_u8";
22 case 2: return "Sk4f_roundtrip_u16";
23 case 4: return "Sk4f_roundtrip_int";
24 }
25 SkASSERT(false);
26 return "";
27 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
#define T
Definition: precompiler.cc:65

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