Flutter Engine
The Flutter Engine
Protected Member Functions | Protected Attributes | List of all members
DecodeBench Class Reference
Inheritance diagram for DecodeBench:
Benchmark SkRefCnt SkRefCntBase BitmapDecodeBench SkottieDecodeBench SkottiePictureDecodeBench

Protected Member Functions

 DecodeBench (const char *name, const char *source)
 
bool isSuitableFor (Backend backend) final
 
const char * onGetName () final
 
void onDelayedSetup () 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

sk_sp< SkDatafData
 

Additional Inherited Members

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

Detailed Description

Definition at line 18 of file DecodeBench.cpp.

Constructor & Destructor Documentation

◆ DecodeBench()

DecodeBench::DecodeBench ( const char *  name,
const char *  source 
)
inlineprotected

Definition at line 20 of file DecodeBench.cpp.

21 : fName(SkStringPrintf("decode_%s", name))
22 , fSource(source)
23 {}
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
SkBitmap source
Definition: examples.cpp:28
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32

Member Function Documentation

◆ isSuitableFor()

bool DecodeBench::isSuitableFor ( Backend  backend)
inlinefinalprotectedvirtual

Reimplemented from Benchmark.

Definition at line 25 of file DecodeBench.cpp.

25 {
27 }
const char * backend

◆ onDelayedSetup()

void DecodeBench::onDelayedSetup ( )
inlineoverrideprotectedvirtual

Reimplemented from Benchmark.

Definition at line 31 of file DecodeBench.cpp.

31 {
32 fData = GetResourceAsData(fSource);
34 }
sk_sp< SkData > GetResourceAsData(const char *resource)
Definition: Resources.cpp:42
#define SkASSERT(cond)
Definition: SkAssert.h:116
sk_sp< SkData > fData
Definition: DecodeBench.cpp:37

◆ onGetName()

const char * DecodeBench::onGetName ( )
inlinefinalprotectedvirtual

Implements Benchmark.

Definition at line 29 of file DecodeBench.cpp.

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

Member Data Documentation

◆ fData

sk_sp<SkData> DecodeBench::fData
protected

Definition at line 37 of file DecodeBench.cpp.


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