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

Public Member Functions

 ConicPathBench (Flags flags)
 
void appendName (SkString *name) override
 
void makePath (SkPath *path) override
 
- Public Member Functions inherited from HairlinePathBench
 HairlinePathBench (Flags flags)
 
virtual void appendName (SkString *)=0
 
virtual void makePath (SkPath *)=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 HairlinePathBench
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 ()
 

Detailed Description

Definition at line 145 of file HairlinePathBench.cpp.

Constructor & Destructor Documentation

◆ ConicPathBench()

ConicPathBench::ConicPathBench ( Flags  flags)
inline

Definition at line 147 of file HairlinePathBench.cpp.

147: INHERITED(flags) {}
FlutterSemanticsFlag flags

Member Function Documentation

◆ appendName()

void ConicPathBench::appendName ( SkString name)
inlineoverridevirtual

Implements HairlinePathBench.

Definition at line 149 of file HairlinePathBench.cpp.

149 {
150 name->append("conic");
151 }
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32

◆ makePath()

void ConicPathBench::makePath ( SkPath path)
inlineoverridevirtual

Implements HairlinePathBench.

Definition at line 152 of file HairlinePathBench.cpp.

152 {
153 SkRandom rand;
154 SkRandom randWeight;
155 int size = std::size(points);
156 int hSize = size / 2;
157 for (int i = 0; i < kMaxPathSize; ++i) {
158 int xTrans = 10 + 40 * (i%(kMaxPathSize/2));
159 int yTrans = 0;
160 if (i > kMaxPathSize/2 - 1) {
161 yTrans = 40;
162 }
163 int base1 = 2 * rand.nextULessThan(hSize);
164 int base2 = 2 * rand.nextULessThan(hSize);
165 int base3 = 2 * rand.nextULessThan(hSize);
166 float weight = randWeight.nextRangeF(0.0f, 2.0f);
167 path->moveTo(SkIntToScalar(points[base1] + xTrans),
168 SkIntToScalar(points[base1+1] + yTrans));
169 path->conicTo(SkIntToScalar(points[base2] + xTrans),
170 SkIntToScalar(points[base2+1] + yTrans),
171 SkIntToScalar(points[base3] + xTrans),
172 SkIntToScalar(points[base3+1] + yTrans),
173 weight);
174 }
175 }
static const int kMaxPathSize
static const int points[]
#define SkIntToScalar(x)
Definition: SkScalar.h:57
uint32_t nextULessThan(uint32_t count)
Definition: SkRandom.h:93
float nextRangeF(float min, float max)
Definition: SkRandom.h:64
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259

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