Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QuadPathBench Class Reference
Inheritance diagram for QuadPathBench:
HairlinePathBench Benchmark SkRefCnt SkRefCntBase

Public Member Functions

 QuadPathBench (Flags flags)
 
void appendName (SkString *name) override
 
void makePath (SkPath *path) override
 
- Public Member Functions inherited from HairlinePathBench
 HairlinePathBench (Flags flags)
 
- 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 * onGetUniqueName ()
 
virtual void onDelayedSetup ()
 
virtual void onPerCanvasPreDraw (SkCanvas *)
 
virtual void onPerCanvasPostDraw (SkCanvas *)
 
virtual void onPreDraw (SkCanvas *)
 
virtual void onPostDraw (SkCanvas *)
 
virtual SkISize onGetSize ()
 

Detailed Description

Definition at line 113 of file HairlinePathBench.cpp.

Constructor & Destructor Documentation

◆ QuadPathBench()

QuadPathBench::QuadPathBench ( Flags  flags)
inline

Definition at line 115 of file HairlinePathBench.cpp.

115: INHERITED(flags) {}
FlutterSemanticsFlag flags

Member Function Documentation

◆ appendName()

void QuadPathBench::appendName ( SkString name)
inlineoverridevirtual

Implements HairlinePathBench.

Definition at line 117 of file HairlinePathBench.cpp.

117 {
118 name->append("quad");
119 }
const char * name
Definition fuchsia.cc:50

◆ makePath()

void QuadPathBench::makePath ( SkPath path)
inlineoverridevirtual

Implements HairlinePathBench.

Definition at line 120 of file HairlinePathBench.cpp.

120 {
121 SkRandom rand;
122 int size = std::size(points);
123 int hSize = size / 2;
124 for (int i = 0; i < kMaxPathSize; ++i) {
125 int xTrans = 10 + 40 * (i%(kMaxPathSize/2));
126 int yTrans = 0;
127 if (i > kMaxPathSize/2 - 1) {
128 yTrans = 40;
129 }
130 int base1 = 2 * rand.nextULessThan(hSize);
131 int base2 = 2 * rand.nextULessThan(hSize);
132 int base3 = 2 * rand.nextULessThan(hSize);
133 path->moveTo(SkIntToScalar(points[base1] + xTrans),
134 SkIntToScalar(points[base1+1] + yTrans));
135 path->quadTo(SkIntToScalar(points[base2] + xTrans),
136 SkIntToScalar(points[base2+1] + yTrans),
137 SkIntToScalar(points[base3] + xTrans),
138 SkIntToScalar(points[base3+1] + yTrans));
139 }
140 }
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
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: