Flutter Engine
The Flutter Engine
|
Public Types | |
enum | VertexMode { kNone_VertexMode , kColors_VertexMode , kTexCoords_VertexMode , kBoth_VertexMode } |
Public Types inherited from Benchmark | |
enum class | Backend { kNonRendering , kRaster , kGanesh , kGraphite , kPDF , kHWUI } |
Public Member Functions | |
PatchBench (SkPoint scale, VertexMode vertexMode) | |
virtual void | appendName (SkString *name) |
virtual void | setCubics () |
virtual void | setColors () |
virtual void | setTexCoords () |
virtual sk_sp< SkShader > | createShader () |
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 |
Protected Types | |
using | INHERITED = Benchmark |
Protected Member Functions | |
const char * | onGetName () override |
void | onDelayedSetup () 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 () |
Protected Attributes | |
SkPaint | fPaint |
SkString | fName |
SkVector | fScale |
SkPoint | fCubics [12] |
SkPoint | fTexCoords [4] |
SkColor | fColors [4] |
VertexMode | fVertexMode |
This bench measures the rendering time of the call SkCanvas::drawPatch with different types of input patches (regular case, with loops, a square, with a big difference between "parallel" sides). This bench also tests the different combination of optional parameters for the function (passing texture coordinates and colors, only textures coordinates, only colors or none). Finally, it applies a scale to test if the size affects the rendering time.
Definition at line 24 of file PatchBench.cpp.
|
protected |
Definition at line 157 of file PatchBench.cpp.
Enumerator | |
---|---|
kNone_VertexMode | |
kColors_VertexMode | |
kTexCoords_VertexMode | |
kBoth_VertexMode |
Definition at line 28 of file PatchBench.cpp.
|
inline |
Definition at line 35 of file PatchBench.cpp.
|
inlinevirtual |
Reimplemented in SquarePatchBench, LODDiffPatchBench, and LoopPatchBench.
Definition at line 40 of file PatchBench.cpp.
Definition at line 74 of file PatchBench.cpp.
|
inlineoverrideprotectedvirtual |
Reimplemented from Benchmark.
Definition at line 111 of file PatchBench.cpp.
Implements Benchmark.
Definition at line 127 of file PatchBench.cpp.
|
inlineoverrideprotectedvirtual |
Implements Benchmark.
Definition at line 86 of file PatchBench.cpp.
|
inlinevirtual |
Definition at line 59 of file PatchBench.cpp.
|
inlinevirtual |
Reimplemented in SquarePatchBench, LODDiffPatchBench, and LoopPatchBench.
Definition at line 45 of file PatchBench.cpp.
|
inlinevirtual |
Definition at line 66 of file PatchBench.cpp.
|
protected |
Definition at line 154 of file PatchBench.cpp.
|
protected |
Definition at line 152 of file PatchBench.cpp.
|
protected |
Definition at line 150 of file PatchBench.cpp.
|
protected |
Definition at line 149 of file PatchBench.cpp.
|
protected |
Definition at line 151 of file PatchBench.cpp.
|
protected |
Definition at line 153 of file PatchBench.cpp.
|
protected |
Definition at line 155 of file PatchBench.cpp.