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

Public Member Functions

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

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

Additional Inherited Members

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

Detailed Description

Definition at line 20 of file ClipMaskBench.cpp.

Constructor & Destructor Documentation

◆ RasterTileBench()

RasterTileBench::RasterTileBench ( )
inline

Definition at line 25 of file ClipMaskBench.cpp.

25 : fName("rastertile") {
26 int W = 2014 * 20;
27 int H = 20;
29
30 fPath.moveTo(0, 0);
31 fPath.cubicTo(20, 10, 10, 15, 30, 5);
32 }
#define W
Definition: aaa.cpp:17
SkPath & moveTo(SkScalar x, SkScalar y)
Definition: SkPath.cpp:688
SkPath & cubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar x3, SkScalar y3)
Definition: SkPath.cpp:799
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
Definition: SkMD5.cpp:130
static SkImageInfo MakeN32Premul(int width, int height)

Member Function Documentation

◆ onDraw()

void RasterTileBench::onDraw ( int  loops,
SkCanvas canvas 
)
inlineoverrideprotectedvirtual

Implements Benchmark.

Definition at line 37 of file ClipMaskBench.cpp.

37 {
40 paint.setStrokeWidth(1.1f);
41 paint.setAntiAlias(true);
42
43 for (int i = 0; i < loops; ++i) {
44 for (int j = 0; j < 1000; ++j) {
45 fSurf->getCanvas()->drawPath(fPath, paint);
46 }
47 }
48 }
void drawPath(const SkPath &path, const SkPaint &paint)
Definition: SkCanvas.cpp:1747
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
SkCanvas * getCanvas()
Definition: SkSurface.cpp:82
const Paint & paint
Definition: color_source.cc:38

◆ onGetName()

const char * RasterTileBench::onGetName ( )
inlineoverrideprotectedvirtual

Implements Benchmark.

Definition at line 35 of file ClipMaskBench.cpp.

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

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