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

Public Member Functions

 LinePathBench (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 81 of file HairlinePathBench.cpp.

Constructor & Destructor Documentation

◆ LinePathBench()

LinePathBench::LinePathBench ( Flags  flags)
inline

Definition at line 83 of file HairlinePathBench.cpp.

83: INHERITED(flags) {}
FlutterSemanticsFlag flags

Member Function Documentation

◆ appendName()

void LinePathBench::appendName ( SkString name)
inlineoverridevirtual

Implements HairlinePathBench.

Definition at line 85 of file HairlinePathBench.cpp.

85 {
86 name->append("line");
87 }
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32

◆ makePath()

void LinePathBench::makePath ( SkPath path)
inlineoverridevirtual

Implements HairlinePathBench.

Definition at line 88 of file HairlinePathBench.cpp.

88 {
89 SkRandom rand;
90 int size = std::size(points);
91 int hSize = size / 2;
92 for (int i = 0; i < kMaxPathSize; ++i) {
93 int xTrans = 10 + 40 * (i%(kMaxPathSize/2));
94 int yTrans = 0;
95 if (i > kMaxPathSize/2 - 1) {
96 yTrans = 40;
97 }
98 int base1 = 2 * rand.nextULessThan(hSize);
99 int base2 = 2 * rand.nextULessThan(hSize);
100 int base3 = 2 * rand.nextULessThan(hSize);
101 path->moveTo(SkIntToScalar(points[base1] + xTrans),
102 SkIntToScalar(points[base1+1] + yTrans));
103 path->lineTo(SkIntToScalar(points[base2] + xTrans),
104 SkIntToScalar(points[base2+1] + yTrans));
105 path->lineTo(SkIntToScalar(points[base3] + xTrans),
106 SkIntToScalar(points[base3+1] + yTrans));
107 }
108 }
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: