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

Public Member Functions

 ConicBench_EvalTan (bool useV2)
 
void onDraw (int loops, SkCanvas *) override
 
- Public Member Functions inherited from ConicBench_Chop
 ConicBench_Chop ()
 
bool isSuitableFor (Backend backend) 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 ()
 
- Protected Attributes inherited from ConicBench_Chop
SkConic fRQ
 
SkConic fDst [2]
 
SkString fName
 

Detailed Description

Definition at line 952 of file PathBench.cpp.

Constructor & Destructor Documentation

◆ ConicBench_EvalTan()

ConicBench_EvalTan::ConicBench_EvalTan ( bool  useV2)
inline

Definition at line 955 of file PathBench.cpp.

955 : fUseV2(useV2) {
956 fName.printf("conic-eval-tan%d", useV2);
957 }
SkString fName
Definition: PathBench.cpp:901
void printf(const char format[],...) SK_PRINTF_LIKE(2
Definition: SkString.cpp:534

Member Function Documentation

◆ onDraw()

void ConicBench_EvalTan::onDraw ( int  loops,
SkCanvas  
)
inlineoverridevirtual

Reimplemented from ConicBench_Chop.

Definition at line 958 of file PathBench.cpp.

958 {
959 if (fUseV2) {
960 for (int i = 0; i < loops; ++i) {
961 for (int j = 0; j < 1000; ++j) {
962 fDst[0].fPts[0] = fRQ.evalTangentAt(0.4f);
963 }
964 }
965 } else {
966 for (int i = 0; i < loops; ++i) {
967 for (int j = 0; j < 1000; ++j) {
968 fRQ.evalAt(0.4f, nullptr, &fDst[0].fPts[0]);
969 }
970 }
971 }
972 }
SkPoint fPts[2]
SkConic fDst[2]
Definition: PathBench.cpp:900
SkVector evalTangentAt(SkScalar t) const
void evalAt(SkScalar t, SkPoint *pos, SkVector *tangent=nullptr) const
SkPoint fPts[3]
Definition: SkGeometry.h:336

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