Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
BezierBench.cpp File Reference
#include "bench/Benchmark.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/core/SkString.h"

Go to the source code of this file.

Classes

struct  BezierRec
 
class  BezierBench
 

Typedefs

typedef const char *(* DrawProc) (const BezierRec *, int)
 

Functions

static const char * draw_quad (const BezierRec *rec, int count)
 
static const char * draw_cubic (const BezierRec *rec, int count)
 

Typedef Documentation

◆ DrawProc

typedef const char *(* DrawProc) (const BezierRec *, int)

Definition at line 21 of file BezierBench.cpp.

Function Documentation

◆ draw_cubic()

static const char * draw_cubic ( const BezierRec rec,
int  count 
)
static

Definition at line 35 of file BezierBench.cpp.

35 {
36 if (rec) {
37 SkCanvas* canvas = rec->fCanvas;
38 const SkPaint& paint = rec->fPaint;
39 const SkPath& path = rec->fCubic;
40 for (int i = 0; i < count; ++i) {
41 canvas->drawPath(path, paint);
42 }
43 }
44 return "cubic";
45}
int count
void drawPath(const SkPath &path, const SkPaint &paint)
const Paint & paint
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
SkCanvas * fCanvas
SkPath fCubic
SkPaint fPaint

◆ draw_quad()

static const char * draw_quad ( const BezierRec rec,
int  count 
)
static

Definition at line 23 of file BezierBench.cpp.

23 {
24 if (rec) {
25 SkCanvas* canvas = rec->fCanvas;
26 const SkPaint& paint = rec->fPaint;
27 const SkPath& path = rec->fQuad;
28 for (int i = 0; i < count; ++i) {
29 canvas->drawPath(path, paint);
30 }
31 }
32 return "quad";
33}
SkPath fQuad