Flutter Engine
The Flutter Engine
Classes | Enumerations | Functions | Variables
PathIterBench.cpp File Reference
#include "bench/Benchmark.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColorPriv.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/core/SkShader.h"
#include "include/core/SkString.h"
#include "src/base/SkRandom.h"
#include "src/core/SkPathPriv.h"

Go to the source code of this file.

Classes

class  PathIterBench
 

Enumerations

enum class  PathIterType { kIter , kRaw , kEdge }
 

Functions

static int rand_pts (SkRandom &rand, SkPoint pts[4])
 

Variables

const char * gPathIterNames []
 

Enumeration Type Documentation

◆ PathIterType

enum class PathIterType
strong
Enumerator
kIter 
kRaw 
kEdge 

Definition at line 18 of file PathIterBench.cpp.

18 {
19 kIter,
20 kRaw,
21 kEdge,
22};

Function Documentation

◆ rand_pts()

static int rand_pts ( SkRandom rand,
SkPoint  pts[4] 
)
static

Definition at line 27 of file PathIterBench.cpp.

27 {
28 int n = rand.nextU() & 3;
29 n += 1;
30
31 for (int i = 0; i < n; ++i) {
32 pts[i].fX = rand.nextSScalar1();
33 pts[i].fY = rand.nextSScalar1();
34 }
35 return n;
36}
uint32_t nextU()
Definition: SkRandom.h:42
SkScalar nextSScalar1()
Definition: SkRandom.h:113
float fX
x-axis value
Definition: SkPoint_impl.h:164
float fY
y-axis value
Definition: SkPoint_impl.h:165

Variable Documentation

◆ gPathIterNames

const char* gPathIterNames[]
Initial value:
= {
"iter", "raw", "edge"
}

Definition at line 23 of file PathIterBench.cpp.