Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions | Variables
PathBench.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/SkPathUtils.h"
#include "include/core/SkRRect.h"
#include "include/core/SkShader.h"
#include "include/core/SkString.h"
#include "include/private/base/SkTArray.h"
#include "include/private/base/SkTDArray.h"
#include "src/base/SkRandom.h"
#include "src/core/SkDraw.h"
#include "src/core/SkMatrixPriv.h"
#include "src/core/SkGeometry.h"
#include "include/pathops/SkPathOps.h"
#include "src/core/SkPathPriv.h"

Go to the source code of this file.

Classes

class  PathBench
 
class  TrianglePathBench
 
class  RectPathBench
 
class  RotatedRectBench
 
class  OvalPathBench
 
class  CirclePathBench
 
class  NonAACirclePathBench
 
class  AAAConcavePathBench
 
class  AAAConvexPathBench
 
class  SawToothPathBench
 
class  LongCurvedPathBench
 
class  LongLinePathBench
 
class  RandomPathBench
 
class  PathCreateBench
 
class  PathCopyBench
 
class  PathTransformBench
 
class  PathEqualityBench
 
class  SkBench_AddPathTest
 
class  CirclesBench
 
class  ArbRoundRectBench
 
class  ConservativelyContainsBench
 
class  ConicBench_Chop
 
class  ConicBench_EvalPos
 
class  ConicBench_EvalTan
 
class  ConicBench_TinyError
 
class  ConicBench
 
class  ConicBench_ComputeError
 
class  ConicBench_asQuadTol
 
class  ConicBench_quadPow2
 
class  TightBoundsBench
 
class  CommonConvexBench
 

Macros

#define FLAGS00   Flags(0)
 
#define FLAGS01   Flags(kStroke_Flag)
 
#define FLAGS10   Flags(kBig_Flag)
 
#define FLAGS11   Flags(kStroke_Flag | kBig_Flag)
 

Enumerations

enum  Flags {
  kStroke_Flag = 1 << 0 , kBig_Flag = 1 << 1 , kNone = 0 , kA = 1 ,
  kB = 2 , kC = 4
}
 

Functions

static void rand_conic (SkConic *conic, SkRandom &rand)
 
 DEF_BENCH (return new RotatedRectBench(FLAGS00, false, 45))
 
 DEF_BENCH (return new RotatedRectBench(FLAGS10, false, 45))
 
 DEF_BENCH (return new RotatedRectBench(FLAGS00, true, 45))
 
 DEF_BENCH (return new RotatedRectBench(FLAGS10, true, 45))
 
 DEF_BENCH (return new TightBoundsBench([](const SkPath &path){ return path.computeTightBounds();}, "priv");) DEF_BENCH(return new TightBoundsBench([](const SkPath &path)
 

Variables

 pathops
 

Macro Definition Documentation

◆ FLAGS00

#define FLAGS00   Flags(0)

Definition at line 32 of file PathBench.cpp.

◆ FLAGS01

#define FLAGS01   Flags(kStroke_Flag)

Definition at line 33 of file PathBench.cpp.

◆ FLAGS10

#define FLAGS10   Flags(kBig_Flag)

Definition at line 34 of file PathBench.cpp.

◆ FLAGS11

#define FLAGS11   Flags(kStroke_Flag | kBig_Flag)

Definition at line 35 of file PathBench.cpp.

Enumeration Type Documentation

◆ Flags

enum Flags
Enumerator
kStroke_Flag 
kBig_Flag 
kNone 
kA 
kB 
kC 

Definition at line 27 of file PathBench.cpp.

27 {
28 kStroke_Flag = 1 << 0,
29 kBig_Flag = 1 << 1
30};
@ kBig_Flag
Definition PathBench.cpp:29
@ kStroke_Flag
Definition PathBench.cpp:28

Function Documentation

◆ DEF_BENCH() [1/5]

DEF_BENCH ( return new   RotatedRectBenchFLAGS00, false, 45)

◆ DEF_BENCH() [2/5]

DEF_BENCH ( return new   RotatedRectBenchFLAGS00, true, 45)

◆ DEF_BENCH() [3/5]

DEF_BENCH ( return new   RotatedRectBenchFLAGS10, false, 45)

◆ DEF_BENCH() [4/5]

DEF_BENCH ( return new   RotatedRectBenchFLAGS10, true, 45)

◆ DEF_BENCH() [5/5]

DEF_BENCH ( return new TightBoundsBench([](const SkPath &path){ return path.computeTightBounds();}, "priv");  ) const &
new

Definition at line 1225 of file PathBench.cpp.

1225 { return path.computeTightBounds();},
1226 "priv"); )
1227DEF_BENCH( return new TightBoundsBench([](const SkPath& path) {
1228 SkRect bounds; TightBounds(path, &bounds); return bounds;
1229 }, "pathops"); )
#define DEF_BENCH(code)
Definition Benchmark.h:20
bool SK_API TightBounds(const SkPath &path, SkRect *result)
Optional< SkRect > bounds
Definition SkRecords.h:189
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

◆ rand_conic()

static void rand_conic ( SkConic conic,
SkRandom rand 
)
static

Definition at line 1015 of file PathBench.cpp.

1015 {
1016 for (int i = 0; i < 3; ++i) {
1017 conic->fPts[i].set(rand.nextUScalar1() * 100, rand.nextUScalar1() * 100);
1018 }
1019 if (rand.nextUScalar1() > 0.5f) {
1020 conic->fW = rand.nextUScalar1();
1021 } else {
1022 conic->fW = 1 + rand.nextUScalar1() * 4;
1023 }
1024}
SkScalar nextUScalar1()
Definition SkRandom.h:101
AI float conic(float tolerance, const SkPoint pts[], float w, const VectorXform &vectorXform=VectorXform())

Variable Documentation

◆ pathops

pathops

Definition at line 1229 of file PathBench.cpp.