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

Public Member Functions

 CubicPathBench (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 181 of file HairlinePathBench.cpp.

Constructor & Destructor Documentation

◆ CubicPathBench()

CubicPathBench::CubicPathBench ( Flags  flags)
inline

Definition at line 183 of file HairlinePathBench.cpp.

183: INHERITED(flags) {}
FlutterSemanticsFlag flags

Member Function Documentation

◆ appendName()

void CubicPathBench::appendName ( SkString name)
inlineoverridevirtual

Implements HairlinePathBench.

Definition at line 185 of file HairlinePathBench.cpp.

185 {
186 name->append("cubic");
187 }
const char * name
Definition fuchsia.cc:50

◆ makePath()

void CubicPathBench::makePath ( SkPath path)
inlineoverridevirtual

Implements HairlinePathBench.

Definition at line 188 of file HairlinePathBench.cpp.

188 {
189 SkRandom rand;
190 int size = std::size(points);
191 int hSize = size / 2;
192 for (int i = 0; i < kMaxPathSize; ++i) {
193 int xTrans = 10 + 40 * (i%(kMaxPathSize/2));
194 int yTrans = 0;
195 if (i > kMaxPathSize/2 - 1) {
196 yTrans = 40;
197 }
198 int base1 = 2 * rand.nextULessThan(hSize);
199 int base2 = 2 * rand.nextULessThan(hSize);
200 int base3 = 2 * rand.nextULessThan(hSize);
201 int base4 = 2 * rand.nextULessThan(hSize);
202 path->moveTo(SkIntToScalar(points[base1] + xTrans),
203 SkIntToScalar(points[base1+1] + yTrans));
204 path->cubicTo(SkIntToScalar(points[base2] + xTrans),
205 SkIntToScalar(points[base2+1] + yTrans),
206 SkIntToScalar(points[base3] + xTrans),
207 SkIntToScalar(points[base3+1] + yTrans),
208 SkIntToScalar(points[base4] + xTrans),
209 SkIntToScalar(points[base4+1] + yTrans));
210 }
211 }
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: