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

Public Member Functions

 MapRectMatrixBench (const char name[], bool scale_trans)
 
void performTest () override
 
- Public Member Functions inherited from MatrixBench
 MatrixBench (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
 

Additional Inherited Members

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

Detailed Description

Definition at line 232 of file MatrixBench.cpp.

Constructor & Destructor Documentation

◆ MapRectMatrixBench()

MapRectMatrixBench::MapRectMatrixBench ( const char  name[],
bool  scale_trans 
)
inline

Definition at line 239 of file MatrixBench.cpp.

240 : MatrixBench(name), fScaleTrans(scale_trans)
241 {
242 fM.setScale(2, 3);
243 fM.postTranslate(1, 2);
244
245 fR.setLTRB(10, 10, 100, 200);
246 }
MatrixBench(const char name[])
Definition: MatrixBench.cpp:16
SkMatrix & postTranslate(SkScalar dx, SkScalar dy)
Definition: SkMatrix.cpp:281
SkMatrix & setScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
Definition: SkMatrix.cpp:296
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
void setLTRB(float left, float top, float right, float bottom)
Definition: SkRect.h:865

Member Function Documentation

◆ performTest()

void MapRectMatrixBench::performTest ( )
inlineoverridevirtual

Implements MatrixBench.

Definition at line 248 of file MatrixBench.cpp.

248 {
249 SkRect dst;
250 if (fScaleTrans) {
251 for (int i = 0; i < MEGA_LOOP; ++i) {
252 fM.mapRectScaleTranslate(&dst, fR);
253 }
254 } else {
255 for (int i = 0; i < MEGA_LOOP; ++i) {
256 fM.mapRect(&dst, fR);
257 }
258 }
259 }
void mapRectScaleTranslate(SkRect *dst, const SkRect &src) const
Definition: SkMatrix.cpp:1128
bool mapRect(SkRect *dst, const SkRect &src, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
Definition: SkMatrix.cpp:1141
dst
Definition: cp.py:12

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